jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/834642 )
Change subject: [flake8] Solve B026 bugbear issue ......................................................................
[flake8] Solve B026 bugbear issue
Do not unpack positional arguments after keyword arguments
Bug: T318472 Change-Id: I58c75370f5d69a63fcfb08b5659c870e7db8d504 --- M pywikibot/page/_wikibase.py M tox.ini 2 files changed, 5 insertions(+), 9 deletions(-)
Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page/_wikibase.py b/pywikibot/page/_wikibase.py index 4193764..8a721d7 100644 --- a/pywikibot/page/_wikibase.py +++ b/pywikibot/page/_wikibase.py @@ -1264,15 +1264,11 @@ data['datatype'] = self._type return data
- def newClaim(self, *args, **kwargs): - """ - Helper function to create a new claim object for this property. - - :rtype: pywikibot.page.Claim - """ + def newClaim(self, *args, **kwargs) -> 'Claim': + """Helper function to create a new claim object for this property.""" # todo: raise when self.id is -1 - return Claim(self.site, self.getID(), datatype=self.type, - *args, **kwargs) + return Claim(self.site, self.getID(), *args, datatype=self.type, + **kwargs)
def getID(self, numeric: bool = False): """ diff --git a/tox.ini b/tox.ini index be649f4..6a83292 100644 --- a/tox.ini +++ b/tox.ini @@ -110,7 +110,7 @@
# DARXXX: Darglint docstring issues to be solved
-ignore = B007,B026,C103,D105,D211,D401,D413,D412,DAR003,DAR101,DAR102,DAR201,DAR202,DAR301,DAR401,DAR402,DAR501,H101,H238,H301,H306,H404,H405,H903,P101,P102,P103,P205,W503 +ignore = B007,C103,D105,D211,D401,D413,D412,DAR003,DAR101,DAR102,DAR201,DAR202,DAR301,DAR401,DAR402,DAR501,H101,H238,H301,H306,H404,H405,H903,P101,P102,P103,P205,W503 enable-extensions = H203,H204,H205,N818
color = always
pywikibot-commits@lists.wikimedia.org