Remove pyflakes_bypass
There are valid pythonic ways to address all of the complaints that pyflakes made in the past. Fixes bug #1171420 Change-Id: Idf145185ebb4df237fff887365fa0c48d3603025
This commit is contained in:
parent
c8711ce650
commit
7ce9a214f0
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user