jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1052378?usp=email )

Change subject: [IMPR] remove nnecessary parentheses after keyword (PYL-C0325)
......................................................................

[IMPR] remove nnecessary parentheses after keyword (PYL-C0325)

Change-Id: I9c54ff09f874a386767af2cfba676c608925b8f9
---
M pywikibot/config.py
M pywikibot/cosmetic_changes.py
M pywikibot/flow.py
M pywikibot/site/_apisite.py
M scripts/archivebot.py
M scripts/checkimages.py
M scripts/interwiki.py
M scripts/transferbot.py
8 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/config.py b/pywikibot/config.py
index 2daf484..f24d461 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -72,7 +72,7 @@
 _ValueType = TypeVar('_ValueType')


-OSWIN32 = (sys.platform == 'win32')
+OSWIN32 = sys.platform == 'win32'


 # This frozen set should contain all imported modules/variables, so it must
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index c966cdc..3000a0d 100644
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -248,7 +248,7 @@
         self.namespace = page.namespace()

         self.show_diff = show_diff
-        self.template = (self.namespace == Namespace.TEMPLATE)
+        self.template = self.namespace == Namespace.TEMPLATE
         self.talkpage = self.namespace >= 0 and self.namespace % 2 == 1
         self.ignore = ignore

diff --git a/pywikibot/flow.py b/pywikibot/flow.py
index 96401c3..2d58130 100644
--- a/pywikibot/flow.py
+++ b/pywikibot/flow.py
@@ -104,7 +104,7 @@
             if key != 'title':
                 key = key.replace('topiclist_', '').replace('-', '_')
                 if key == 'offset_dir':
-                    new_params['reverse'] = (value == 'rev')
+                    new_params['reverse'] = value == 'rev'
                 else:
                     new_params[key] = value
         return new_params
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index e1af5e0..916d894 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -411,7 +411,7 @@

         if self.is_oauth_token_available():
             if self.userinfo['name'] == self.username():
-                error_msg = (f'Logging in on {self} via OAuth failed')
+                error_msg = f'Logging in on {self} via OAuth failed'
             elif self.username() is None:
                 error_msg = ('No username has been defined in your '
                              'user config file: you have to add in this '
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index f9c72ad..6c05558 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -543,7 +543,7 @@
     def attr2text(self) -> str:
         """Return a template with archiver saveable attributes."""
         return '{{%s\n%s\n}}' \
-               % (self.tpl.title(with_ns=(self.tpl.namespace() != 10)),
+               % (self.tpl.title(with_ns=self.tpl.namespace() != 10),
                   '\n'.join(f'|{a} = {self.get_attr(a)}'
                             for a in self.saveables()))

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index e5d0d87..c430873 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -888,7 +888,7 @@
                 if dup_page.title(as_url=True) != self.image.title(
                         as_url=True) or self.timestamp is None:
                     try:
-                        self.timestamp = (dup_page.latest_file_info.timestamp)
+                        self.timestamp = dup_page.latest_file_info.timestamp
                     except PageRelatedError:
                         continue
                 data = self.timestamp.timetuple()
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 3e3e8f0..855234b 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -1635,7 +1635,7 @@
         pywikibot.info(f'<<lightpurple>>Updating links on page {page}.')
         pywikibot.info(f'Changes to be made: {mods}')
         oldtext = page.get()
-        template = (page.namespace() == 10)
+        template = page.namespace() == 10
         newtext = textlib.replaceLanguageLinks(oldtext, new,
                                                site=page.site,
                                                template=template)
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index 99c87fb..e6b3396 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -128,7 +128,7 @@
             target_title = prefix + page.title()
             page = pywikibot.Page(fromsite, title)
         else:
-            target_title = (prefix + title)
+            target_title = prefix + title
         targetpage = pywikibot.Page(tosite, target_title)
         edithistpage = pywikibot.Page(tosite, target_title + '/edithistory')


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1052378?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9c54ff09f874a386767af2cfba676c608925b8f9
Gerrit-Change-Number: 1052378
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to