jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/673456 )

Change subject: [fix] Simplify if-statement with bool result
......................................................................

[fix] Simplify if-statement with bool result

Change-Id: I89e0a9ed680fcbad226885a53874c79f069330ba
---
M tests/eventstreams_tests.py
1 file changed, 3 insertions(+), 6 deletions(-)

Approvals:
  Matěj Suchánek: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/eventstreams_tests.py b/tests/eventstreams_tests.py
index c1686ba..55ad600 100644
--- a/tests/eventstreams_tests.py
+++ b/tests/eventstreams_tests.py
@@ -159,7 +159,7 @@
         self.assertLength(self.es.filter['all'], 2)


-class TestEventStreamsFilterTests(TestCase):
+class TestEventStreamsFilter(TestCase):

     """Filter tests for eventstreams module."""

@@ -252,11 +252,8 @@
         for none_type in (False, True):
             for all_type in (False, True):
                 for any_type in (False, True, None):
-                    if none_type is False and all_type is True and (
-                            any_type is None or any_type is True):
-                        result = True
-                    else:
-                        result = False
+                    result = none_type is False and all_type is True \
+                        and (any_type is None or any_type is True)
                     self._test_filter(none_type, all_type, any_type, result)



--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/673456
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: I89e0a9ed680fcbad226885a53874c79f069330ba
Gerrit-Change-Number: 673456
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to