jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/770153 )
Change subject: remove unnecessary noqa comments
......................................................................
remove unnecessary noqa comments
Change-Id: Ia6fa41892195d35538c35a16e673e0948e36dd8d
---
M pywikibot/proofreadpage.py
M tests/cosmetic_changes_tests.py
M tests/family_tests.py
M tests/logentries_tests.py
M tests/namespace_tests.py
5 files changed, 8 insertions(+), 11 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index 9ce5bf9..895566a 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -77,7 +77,7 @@
_IndexType = Tuple[Optional['IndexPage'], List['IndexPage']]
-def decompose(fn: Callable) -> Callable: # type: ignore # noqa: N805
+def decompose(fn: Callable) -> Callable: # type: ignore
"""Decorator for ProofreadPage.
Decompose text if needed and recompose text.
@@ -92,7 +92,7 @@
return wrapper
-def check_if_cached(fn: Callable) -> Callable: # type: ignore # noqa: N805
+def check_if_cached(fn: Callable) -> Callable: # type: ignore
"""Decorator for IndexPage to ensure data is cached."""
def wrapper(self: 'IndexPage', *args: Any, **kwargs: Any) -> Any:
if self._cached is False:
diff --git a/tests/cosmetic_changes_tests.py b/tests/cosmetic_changes_tests.py
index de22979..bd85465 100755
--- a/tests/cosmetic_changes_tests.py
+++ b/tests/cosmetic_changes_tests.py
@@ -560,7 +560,7 @@
ISBN_INVALIDLENGTHERROR_RE = 'The number has an invalid length'
@classmethod
- def setUpClass(cls): # noqa: N802
+ def setUpClass(cls):
"""Skip tests if isbn libraries are missing."""
if not has_module('stdnum', version='1.17'):
raise unittest.SkipTest('python-stdnum is not available.')
diff --git a/tests/family_tests.py b/tests/family_tests.py
index b212c20..17fa26a 100755
--- a/tests/family_tests.py
+++ b/tests/family_tests.py
@@ -80,14 +80,12 @@
family = Family.load('wikipedia')
other = 'wikipedia'
self.assertEqual(family, other)
- self.assertFalse(family != other) # noqa: H204
def test_ne_family_with_string_repr_different_family(self):
"""Test that Family and string with different name are not equal."""
family = Family.load('wikipedia')
other = 'wikisource'
self.assertNotEqual(family, other)
- self.assertFalse(family == other) # noqa: H204
def test_eq_family_with_string_repr_not_existing_family(self):
"""Test that Family and string with different name are not equal."""
diff --git a/tests/logentries_tests.py b/tests/logentries_tests.py
index 30717be..357f13b 100755
--- a/tests/logentries_tests.py
+++ b/tests/logentries_tests.py
@@ -279,7 +279,6 @@
le4 = next(gen1)
le5 = next(gen2)
self.assertEqual(le1, le2)
- self.assertFalse(le1 != le2) # noqa: H204
self.assertNotEqual(le1, le3)
self.assertNotEqual(le1, site)
self.assertIsInstance(le4, OtherLogEntry)
diff --git a/tests/namespace_tests.py b/tests/namespace_tests.py
index 5549c9e..e0f18b0 100755
--- a/tests/namespace_tests.py
+++ b/tests/namespace_tests.py
@@ -137,9 +137,9 @@
self.assertEqual(a, 0)
self.assertEqual(a, '')
- self.assertFalse(a < 0) # noqa: H205
- self.assertFalse(a > 0) # noqa: H205
- self.assertNotEqual(a, None) # noqa: H203
+ self.assertGreaterEqual(a, 0)
+ self.assertLessEqual(a, 0)
+ self.assertIsNotNone(a)
self.assertGreater(a, -1)
@@ -166,8 +166,8 @@
self.assertEqual(x, 'image')
self.assertEqual(x, 'Image')
- self.assertFalse(x < 6) # noqa: H205
- self.assertFalse(x > 6) # noqa: H205
+ self.assertGreaterEqual(x, 6)
+ self.assertLessEqual(x, 6)
self.assertEqual(y, 'ملف')
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/770153
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ia6fa41892195d35538c35a16e673e0948e36dd8d
Gerrit-Change-Number: 770153
Gerrit-PatchSet: 2
Gerrit-Owner: JJMC89 <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]