There are valid pythonic ways to address all of the complaints that
pyflakes made in the past.
Fixes bug #
1171420
Change-Id: Idf145185ebb4df237fff887365fa0c48d3603025
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
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()
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
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
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
+++ /dev/null
-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()
# 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"