Browse Source

Fix flake8 3.6.0 errors

Flake8 3.6.0 now warns about both line break after and *before* binary
operator, you have to choose whether you use W503 or W504. Disable the
newer W504.

Also, ignore warning about invalid escape sequence in regex.

Change-Id: Ibfbd5df21e01d5a7bd44a216ff63bc805dd5c186
changes/05/613205/1
Andreas Jaeger 7 months ago
parent
commit
93ddc0247d
2 changed files with 4 additions and 2 deletions
  1. 1
    1
      roles/add-build-sshkey/library/test_sshagent_remove_keys.py
  2. 3
    1
      tox.ini

+ 1
- 1
roles/add-build-sshkey/library/test_sshagent_remove_keys.py View File

@@ -78,7 +78,7 @@ class TestAgent(testtools.TestCase):
78 78
         l = a.list()
79 79
         self.assertEqual(2, len(l))
80 80
 
81
-        run('^(?!\(stdin\)).*')
81
+        run('^(?!\(stdin\)).*')  # noqa
82 82
 
83 83
         l = a.list()
84 84
         self.assertEqual(1, len(l))

+ 3
- 1
tox.ini View File

@@ -53,6 +53,8 @@ commands = {posargs}
53 53
 # These are ignored intentionally in openstack-infra projects;
54 54
 # please don't submit patches that solely correct them or enable them.
55 55
 # E402 - ansible modules put documentation before imports. Align to ansible.
56
-ignore = E125,E129,E402,E741,H
56
+# W504 - line break after binary operator, we cannot have both
57
+#        W503 and W504 enabled
58
+ignore = E125,E129,E402,E741,W504,H
57 59
 show-source = True
58 60
 exclude = .venv,.tox,dist,doc,build,*.egg

Loading…
Cancel
Save