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

Change subject: api: Check module path overlap with isdisjoint
......................................................................

api: Check module path overlap with isdisjoint

Use isdisjoint when asserting that submodule paths do not overlap
the accumulated module paths. Only the presence of an overlap is
needed, so avoid constructing an intersection set.

Preserve the overlap assertion and the returned module paths.

Change-Id: I9841c3ed1549c55639c0e62184545a0df7ea70fd
---
M pywikibot/data/api/_paraminfo.py
1 file changed, 1 insertion(+), 1 deletion(-)

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




diff --git a/pywikibot/data/api/_paraminfo.py b/pywikibot/data/api/_paraminfo.py
index 209b884..4f02ac7 100644
--- a/pywikibot/data/api/_paraminfo.py
+++ b/pywikibot/data/api/_paraminfo.py
@@ -376,7 +376,7 @@
         modules = set(self.action_modules)
         for parent_module in self._modules:
             submodules = self.submodules(parent_module, path=True)
-            assert not submodules & modules
+            assert submodules.isdisjoint(modules)
             modules |= submodules
         return modules


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345269?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: I9841c3ed1549c55639c0e62184545a0df7ea70fd
Gerrit-Change-Number: 1345269
Gerrit-PatchSet: 2
Gerrit-Owner: Mahveotm <[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