jenkins-bot has submitted this change and it was merged.

Change subject: The Final Flakes
......................................................................


The Final Flakes

hashar has enabled the flake8 tests on jenkins to be voting,
so new flakes will be hard to push into the codebase in future.

This changeset removes two that have slipped into the codebase
over the last week.

setup.py:37:9: F401 'unittest' imported but unused
scripts/protect.py:222:41: F812 list comprehension redefines 'p_type'
from line 189

Change-Id: I19fb7ca525383ef1ab13e807edc9b4b00394cbb1
---
M scripts/protect.py
M setup.py
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/protect.py b/scripts/protect.py
index 256d76b..f3f4fc5 100644
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -186,10 +186,10 @@
             if arg.startswith('-'):
                 delimiter = arg.find(':')
                 if delimiter > 0:
-                    p_type = arg[1:delimiter]
+                    p_type_arg = arg[1:delimiter]
                     level = arg[delimiter + 1:]
-                    if p_type in protection_types:
-                        protections[p_type] = level
+                    if p_type_arg in protection_types:
+                        protections[p_type_arg] = level
                         is_p_type = True
             if not is_p_type:
                 if not genFactory.handleArg(arg):
diff --git a/setup.py b/setup.py
index b4dc10f..4d64d1f 100644
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,7 @@
         raise RuntimeError("ERROR: Pywikibot only runs under Python 2.6.5 or 
higher")
     elif sys.version_info[1] == 6:
         # work around distutils hardcoded unittest dependency
-        import unittest
+        import unittest  # flake8: noqa
         if 'test' in sys.argv and sys.version_info < (2, 7):
             import unittest2
             sys.modules['unittest'] = unittest2

-- 
To view, visit https://gerrit.wikimedia.org/r/154832
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I19fb7ca525383ef1ab13e807edc9b4b00394cbb1
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to