From 05ba926350fe166ffd2bbe92a149af2c5d0cba5a Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 14 Mar 2019 18:26:17 +0100 Subject: [PATCH] Applying flake8 rules to some files --- lib/webhooks/forge/__init__.py | 18 ++++++------------ lib/webhooks/forge/mod_dict.py | 6 +++--- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/webhooks/forge/__init__.py b/lib/webhooks/forge/__init__.py index fa68986..032d5cd 100644 --- a/lib/webhooks/forge/__init__.py +++ b/lib/webhooks/forge/__init__.py @@ -10,24 +10,17 @@ from __future__ import absolute_import # Standard modules import logging -import re -import copy -import warnings -import time import datetime -import collections # Own modules -from fb_tools.common import pp, to_str, to_bool, is_sequence -from fb_tools.obj import FbBaseObjectError, FbBaseObject +from fb_tools.common import pp +from fb_tools.obj import FbBaseObject from ..xlate import XLATOR -from ..base_module_info import BaseModuleInfoError, BaseModuleInfo +from ..base_module_info import BaseModuleInfoError -from ..module_meta_info import ModuleMetadata - -__version__ = '0.2.0' +__version__ = '0.2.1' LOG = logging.getLogger(__name__) @@ -72,7 +65,8 @@ class BaseForgeObject(FbBaseObject): self._uri = None super(BaseForgeObject, self).__init__( - appname=appname, verbose=verbose, version=version, base_dir=base_dir, initialized=False) + appname=appname, verbose=verbose, version=version, + base_dir=base_dir, initialized=False) self.slug = slug self.uri = uri diff --git a/lib/webhooks/forge/mod_dict.py b/lib/webhooks/forge/mod_dict.py index d4e899f..6ca545c 100644 --- a/lib/webhooks/forge/mod_dict.py +++ b/lib/webhooks/forge/mod_dict.py @@ -37,7 +37,7 @@ from ..base_app import BaseHookError from ..xlate import XLATOR -__version__ = '0.2.0' +__version__ = '0.2.1' LOG = logging.getLogger(__name__) @@ -50,6 +50,7 @@ class ForgeModuleDictError(BaseHookError): pass + # ============================================================================= class ParentNotExistingError(ForgeModuleDictError, IOError): @@ -486,7 +487,6 @@ class ForgeModuleDict(MutableMapping, FbBaseObject): output_file = self.data_file if not output_file.is_absolute(): output_file = self.data_dir / self.data_file - #output_file = output_file.resolve() output_file = Path(os.path.abspath(str(output_file))) fd = None @@ -544,8 +544,8 @@ class ForgeModuleDict(MutableMapping, FbBaseObject): src=str(tmp_file), tgt=str(output_file))) tmp_file.rename(output_file) -# ============================================================================= +# ============================================================================= if __name__ == "__main__": pass -- 2.39.5