Stricter flake8 check
- remove some flake8 warnings from ignore list; - enable flake8 for tools; - fix flake8 warnings for tools. Change-Id: I5ddb5f7a3c62be1c7f88440bdf82bd93783f46de
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
from optparse import OptionParser
|
||||
|
||||
import getpass
|
||||
import os
|
||||
import sys
|
||||
import yaml
|
||||
@@ -17,10 +16,10 @@ if os.path.exists(os.path.join(possible_topdir,
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
||||
from anvil import log as logging
|
||||
from anvil import importer
|
||||
from anvil import passwords
|
||||
from anvil.components.helpers import keystone
|
||||
from anvil import importer
|
||||
from anvil import log as logging
|
||||
from anvil import passwords
|
||||
from anvil import utils
|
||||
|
||||
|
||||
@@ -41,7 +40,7 @@ def replace_services_endpoints(token, options):
|
||||
current_services = client.services.list()
|
||||
|
||||
def filter_resource(r):
|
||||
raw = dict(r.__dict__) # Can't access the raw attrs, arg...
|
||||
raw = dict(r.__dict__) # Can't access the raw attrs, arg...
|
||||
raw_cleaned = {}
|
||||
for k, v in raw.items():
|
||||
if k == 'manager' or k.startswith('_'):
|
||||
|
@@ -3,10 +3,10 @@
|
||||
## Tool to run the nova config generating code and spit out a dummy
|
||||
## version. Useful for testing that code in isolation.
|
||||
|
||||
import atexit
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import atexit
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
@@ -18,10 +18,9 @@ if os.path.exists(os.path.join(possible_topdir,
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from anvil.components.helpers.nova import ConfConfigurator
|
||||
from anvil.trace import TraceWriter
|
||||
|
||||
from anvil import utils
|
||||
from anvil import shell as sh
|
||||
from anvil.trace import TraceWriter
|
||||
from anvil import utils
|
||||
|
||||
DUMMY_FILE = tempfile.mktemp()
|
||||
|
||||
@@ -76,7 +75,6 @@ class DummyInstaller(object):
|
||||
self.tracewriter = TraceWriter(DUMMY_FILE)
|
||||
|
||||
|
||||
|
||||
d = DummyInstaller()
|
||||
c = ConfConfigurator(d)
|
||||
print c.generate("foo.conf")
|
||||
print(c.generate("foo.conf"))
|
||||
|
@@ -2,7 +2,6 @@
|
||||
|
||||
from optparse import OptionParser
|
||||
|
||||
import getpass
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -16,9 +15,8 @@ if os.path.exists(os.path.join(possible_topdir,
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
||||
from anvil import log as logging
|
||||
from anvil.components.helpers import glance
|
||||
|
||||
from anvil import log as logging
|
||||
from anvil import passwords
|
||||
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import yaml
|
||||
@@ -22,4 +21,4 @@ if __name__ == "__main__":
|
||||
default_flow_style=False,
|
||||
)
|
||||
print("# Formatted %s" % (fn))
|
||||
print(formatted)
|
||||
print(formatted)
|
||||
|
4
tox.ini
4
tox.ini
@@ -40,6 +40,6 @@ setenv = NOSE_WITH_COVERAGE=1
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = H302,H402,H403,E121,E123,E124,E125,E126,E127,E128,E202,E501
|
||||
ignore = H102,H302,H402,H403,E123,E124,E125,E126,E127,E128,E501
|
||||
builtins = _
|
||||
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
|
||||
exclude = .venv,.tox,dist,doc,*egg,.git,build
|
||||
|
Reference in New Issue
Block a user