From 885b3eda568295f6e2af94a42ffd49b06b50bbfa Mon Sep 17 00:00:00 2001 From: Jose Idar Date: Mon, 16 Feb 2015 16:05:20 -0600 Subject: [PATCH] Updating tox flake8 ignores, and fixing minor pep issues Change-Id: I73ef0dd4d267dc8d3f548aaae1a7f5ebc9fbd044 --- cafe/configurator/managers.py | 35 +++++++++++++++++++---------------- setup.py | 2 +- tox.ini | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/cafe/configurator/managers.py b/cafe/configurator/managers.py index 66ee903..9ba4e6b 100644 --- a/cafe/configurator/managers.py +++ b/cafe/configurator/managers.py @@ -186,8 +186,9 @@ class TestEnvManager(object): override = self._override(self.MANAGED_VARS.engine_config_path) self.engine_config_path = ( - engine_config_path or override - or EngineConfigManager.ENGINE_CONFIG_PATH) + engine_config_path or + override or + EngineConfigManager.ENGINE_CONFIG_PATH) self.engine_config_interface = EngineConfig(self.engine_config_path) @@ -277,23 +278,24 @@ class TestEnvManager(object): # Override happens in __init__ return os.path.expanduser( - self._test_repo_package_name - or self.engine_config_interface.default_test_repo) + self._test_repo_package_name or + self.engine_config_interface.default_test_repo) @_lazy_property def test_data_directory(self): return ( - self._override(self.MANAGED_VARS.test_data_directory) - or os.path.expanduser(self.engine_config_interface.data_directory)) + self._override(self.MANAGED_VARS.test_data_directory) or + os.path.expanduser(self.engine_config_interface.data_directory)) @_lazy_property def test_root_log_dir(self): return ( - self._override(self.MANAGED_VARS.test_root_log_dir) - or os.path.expanduser( + self._override(self.MANAGED_VARS.test_root_log_dir) or + os.path.expanduser( os.path.join( self.engine_config_interface.log_directory, - self.product_name, self.test_config_file_name))) + self.product_name, + self.test_config_file_name))) @_lazy_property def test_log_dir(self): @@ -308,11 +310,12 @@ class TestEnvManager(object): @_lazy_property def test_config_file_path(self): return ( - self._override(self.MANAGED_VARS.test_config_file_path) - or os.path.expanduser( + self._override(self.MANAGED_VARS.test_config_file_path) or + os.path.expanduser( os.path.join( self.engine_config_interface.config_directory, - self.product_name, self.test_config_file_name))) + self.product_name, + self.test_config_file_name))) @_lazy_property def test_logging_verbosity(self): @@ -320,14 +323,14 @@ class TestEnvManager(object): TODO: Implement 'OFF' option that adds null handlers to all loggers """ return ( - self._override(self.MANAGED_VARS.test_logging_verbosity) - or self.engine_config_interface.logging_verbosity) + self._override(self.MANAGED_VARS.test_logging_verbosity) or + self.engine_config_interface.logging_verbosity) @_lazy_property def test_master_log_file_name(self): return ( - self._override(self.MANAGED_VARS.test_master_log_file_name) - or self.engine_config_interface.master_log_file_name) + self._override(self.MANAGED_VARS.test_master_log_file_name) or + self.engine_config_interface.master_log_file_name) class EngineDirectoryManager(object): diff --git a/setup.py b/setup.py index 2c68187..53c32b0 100644 --- a/setup.py +++ b/setup.py @@ -101,7 +101,7 @@ setup( 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', ), - entry_points = { + entry_points={ 'console_scripts': ['cafe-runner = cafe.drivers.unittest.runner:entry_point', 'behave-runner = cafe.drivers.behave.runner:entry_point', diff --git a/tox.ini b/tox.ini index 7d1867b..d1fb846 100644 --- a/tox.ini +++ b/tox.ini @@ -16,5 +16,5 @@ commands=nosetests commands=flake8 [flake8] -ignore=F401 +ignore=F401,E402 exclude=.git,.idea,docs,.tox,bin,dist,tools,*.egg-info \ No newline at end of file