diff --git a/heat/engine/service.py b/heat/engine/service.py index efd962c1ac..55b793cfaf 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -29,7 +29,6 @@ from heat.common import identifier from heat.engine import parameters from heat.engine import parser from heat.engine import resource -from heat.engine import resources # pyflakes_bypass review 23102 from heat.engine import watchrule from heat.openstack.common import log as logging diff --git a/heat/tests/__init__.py b/heat/tests/__init__.py index 2d2be4072c..b273fb4a2e 100644 --- a/heat/tests/__init__.py +++ b/heat/tests/__init__.py @@ -28,9 +28,7 @@ def reset_db(): def setup(): - import mox # pyflakes_bypass Workaround for bug 810424 from heat.db import migration - from heat import db # pyflakes_bypass review 23102 reset_db() migration.db_sync() diff --git a/heat/tests/test_common_policy.py b/heat/tests/test_common_policy.py index 8f64a34657..7915b3c51c 100644 --- a/heat/tests/test_common_policy.py +++ b/heat/tests/test_common_policy.py @@ -20,8 +20,6 @@ from nose.plugins.attrib import attr from oslo.config import cfg import unittest -import heat.api # pyflakes_bypass review 23102 - from heat.common import context from heat.common import policy from heat.common import exception diff --git a/heat/tests/test_security_group.py b/heat/tests/test_security_group.py index ab8051bd44..be3328e51e 100644 --- a/heat/tests/test_security_group.py +++ b/heat/tests/test_security_group.py @@ -22,7 +22,6 @@ from heat.engine import clients from heat.common import context from heat.common import template_format from heat.engine import parser -import heat.engine.resources # pyflakes_bypass review 23102 from heat.tests.v1_1 import fakes from novaclient.v1_1 import security_groups as nova_sg diff --git a/heat/tests/test_vpc.py b/heat/tests/test_vpc.py index 53ec1b8620..1e80e989d2 100644 --- a/heat/tests/test_vpc.py +++ b/heat/tests/test_vpc.py @@ -22,7 +22,6 @@ from heat.common import context from heat.common import exception from heat.common import template_format from heat.engine import parser -import heat.engine.resources # pyflakes_bypass review 23102 try: from quantumclient.common.exceptions import QuantumClientException diff --git a/tools/pyflakes-bypass.py b/tools/pyflakes-bypass.py deleted file mode 100644 index 0105289623..0000000000 --- a/tools/pyflakes-bypass.py +++ /dev/null @@ -1,15 +0,0 @@ -from pyflakes.scripts import pyflakes -from pyflakes.checker import Checker - - -def report_with_bypass(self, messageClass, *args, **kwargs): - message = messageClass(self.filename, *args, **kwargs) - with open(self.filename, 'r') as code: - if 'pyflakes_bypass' in code.readlines()[message.lineno - 1]: - return - self.messages.append(message) - -# monkey patch checker to support bypass -Checker.report = report_with_bypass - -pyflakes.main() diff --git a/tools/run_pep8.sh b/tools/run_pep8.sh index a392184339..9276d74f00 100755 --- a/tools/run_pep8.sh +++ b/tools/run_pep8.sh @@ -16,5 +16,4 @@ ${PEP8} ${EXCLUDE} . # Check binaries without py extension ${PEP8} bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-cfn bin/heat-engine bin/heat-watch -! python tools/pyflakes-bypass.py heat/ | grep "imported but unused\|redefinition of function" - +! pyflakes heat/ | grep "imported but unused\|redefinition of function"