From: Frank Brehm Date: Thu, 14 Mar 2019 17:26:17 +0000 (+0100) Subject: Applying flake8 rules to some files X-Git-Tag: 1.6.4^2~24 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=05ba926350fe166ffd2bbe92a149af2c5d0cba5a;p=pixelpark%2Fpuppetmaster-webhooks.git Applying flake8 rules to some files --- 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