Xqt has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/772317 )
Change subject: [fix] Ignore bugbear B020 issue in config.py
......................................................................
[fix] Ignore bugbear B020 issue in config.py
Bug: T304279
Change-Id: I712a86af7847531f8b5573560ccd324171e003a4
---
M pywikibot/config.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/config.py b/pywikibot/config.py
index 193ec03..4af1991 100644
--- a/pywikibot/config.py
+++ b/pywikibot/config.py
@@ -431,8 +431,9 @@
# find the parent zip folder
path = Path(folder_path)
if not is_zipfile(path):
- for path in path.parents:
+ for parent in path.parents:
if is_zipfile(path):
+ path = parent
break
else:
raise NotADirectoryError('20', 'Not a directory', folder_path)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/772317
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: I712a86af7847531f8b5573560ccd324171e003a4
Gerrit-Change-Number: 772317
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]