File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 11Current Release Changes
22=======================
33
4- * (no changes yet)
4+ * Implement :meth: `pywikibot.ItemPage.get_best_claim ` (:phab: `T400610 `)
5+ * Add *expiry * parameter to :meth: `BasePage.watch()<page.BasePage.watch> ` and
6+ :meth: `Site.watch()<pywikibot.site._apisite.APISite.watch> ` (:phab: `T330839 `)
7+
58
69Deprecations
710============
Original file line number Diff line number Diff line change @@ -182,18 +182,20 @@ def set_redirect_target(
182182 if save :
183183 self .save (** kwargs )
184184
185- def get_best_claim (self , prop : str ):
185+ def get_best_claim (self , prop : str ) -> pywikibot . Claim | None :
186186 """Return the first best Claim for this page.
187187
188188 Return the first 'preferred' ranked Claim specified by Wikibase
189189 property or the first 'normal' one otherwise.
190190
191191 .. versionadded:: 3.0
192192
193- :param prop: property id, "P###"
193+ .. seealso:: :meth:`pywikibot.ItemPage.get_best_claim`
194+
195+ :param prop: Wikibase property ID, must be of the form ``P``
196+ followed by one or more digits (e.g. ``P31``).
194197 :return: Claim object given by Wikibase property number
195198 for this page object.
196- :rtype: pywikibot.Claim or None
197199
198200 :raises UnknownExtensionError: site has no Wikibase extension
199201 """
Original file line number Diff line number Diff line change @@ -1341,16 +1341,20 @@ def isRedirectPage(self):
13411341 return self ._isredir
13421342 return super ().isRedirectPage ()
13431343
1344- def get_best_claim (self , prop : str ):
1344+ def get_best_claim (self , prop : str ) -> pywikibot . Claim | None :
13451345 """Return the first best Claim for this page.
13461346
13471347 Return the first 'preferred' ranked Claim specified by Wikibase
13481348 property or the first 'normal' one otherwise.
13491349
1350- :param prop: property id, "P###"
1350+ .. versionadded:: 10.4
1351+
1352+ .. seealso:: :meth:`pywikibot.Page.get_best_claim`
1353+
1354+ :param prop: Wikibase property ID, must be of the form ``P``
1355+ followed by one or more digits (e.g. ``P31``).
13511356 :return: Claim object given by Wikibase property number
13521357 for this page object.
1353- :rtype: pywikibot.Claim or None
13541358
13551359 :raises UnknownExtensionError: site has no Wikibase extension
13561360 """
You can’t perform that action at this time.
0 commit comments