Skip to content

Commit

Permalink
Merge "doc: fix spelling mistakes"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Dec 7, 2024
2 parents 6d518a8 + 56c3dc3 commit a90ec21
Show file tree
Hide file tree
Showing 63 changed files with 112 additions and 110 deletions.
22 changes: 11 additions & 11 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Release History
-----
*05 October 2024*

* Ignore :exc:`ValueError` durig upcast of :class:`FilePage<pywikibot.page.FilePage>` due to invalid file extension
* Ignore :exc:`ValueError` during upcast of :class:`FilePage<pywikibot.page.FilePage>` due to invalid file extension
(:phab:`T367777`, :phab:`T376452`)
* Provide an entry point to connect foreign scripts with pwb wapper (:phab:`T139143`, :phab:`T139144`)
* Show a warning message for a deleted or unknown :class:`Claim<pywikibot.Claim>` type (:phab:`T374676`)
Expand Down Expand Up @@ -118,7 +118,7 @@ Release History
* No longer wait in :meth:`data.api.Request._http_request` for ``ImportError`` and ``NameError``
* Replace ``requests.utils.urlparse`` with ``urllib.parse.urlparse`` in
:func:`comms.http.get_authentication` (:phab:`T367649`)
* Show an appropiate message if ``requests_oauthlib`` package is required but missing (:phab:`T353387`)
* Show an appropriate message if ``requests_oauthlib`` package is required but missing (:phab:`T353387`)
* Retry ``DBUnexpectedError`` in :meth:`data.api.Request._internal_api_error` (:phab:`T367383`)
* Duplicated entries found in :mod:`pywikibot` were removed
* Pass ``None`` instead of an empty string as *expiry* argument in
Expand Down Expand Up @@ -167,7 +167,7 @@ Release History

* Circumvent problems with *unique* and *prefix* parameters in :meth:`Site.alllinks()
<pywikibot.site._generators.GeneratorsMixin.alllinks>` (:phab:`T359427`)
* Detect nighly version file with :func:`version.getversion_nightly` (:phab:`T362492`)
* Detect nightly version file with :func:`version.getversion_nightly` (:phab:`T362492`)
* :mod:`version`.github_svn_rev2hash() was removed; it was no longer functional (:phab:`T362484`)
* SVN support has been dropped; ``.svnprops`` property settings was removed (:phab:`T362484`)
* Skip process that requires login to logout (:phab:`T326614`)
Expand Down Expand Up @@ -754,7 +754,7 @@ Release History

* Add FilePage.file_is_used property to determine whether a file is used on a site
* Add support for guwwiki and shnwikivoyage (:phab:`T303762`, :phab:`T302799`)
* TextExtracts support was aded (:phab:`T72682`)
* TextExtracts support was added (:phab:`T72682`)
* Unused `get_redirect` parameter of Page.getOldVersion() has been dropped
* Provide BasePage.get_parsed_page() as a public method
* Provide BuiltinNamespace.canonical_namespaces() with BuiltinNamespace IntEnum
Expand Down Expand Up @@ -1224,7 +1224,7 @@ Release History
* Property.getType() method has been removed
* Family.server_time() method was removed; it is still available from Site object (:phab:`T89451`)
* All HttpRequest parameters except of charset has been dropped (:phab:`T265206`)
* A lot of methods and properties of HttpRequest are deprecated in favour of requests.Resonse attributes
* A lot of methods and properties of HttpRequest are deprecated in favour of requests.Response attributes
(:phab:`T265206`)
* Method and properties of HttpRequest are delegated to requests.Response object (:phab:`T265206`)
* comms.threadedhttp.HttpRequest.raw was replaced by HttpRequest.content property (:phab:`T265206`)
Expand Down Expand Up @@ -1311,12 +1311,12 @@ Release History
* Accept only valid names in generate_family_file.py (:phab:`T265328`, :phab:`T265353`)
* New plural.plural_rule() function returns a rule for a given language
* Replace deprecated urllib.request.URLopener with http.fetch (:phab:`T255575`)
* OptionHandler/BaseBot options are accessable as OptionHandler.opt attributes or keyword item
* OptionHandler/BaseBot options are accessible as OptionHandler.opt attributes or keyword item
(see also :phab:`T264721`)
* pywikibot.setAction() function was removed
* A namedtuple is the result of textlib.extract_sections()
* Prevent circular imports in config2.py and http.py (:phab:`T264500`)
* version.get_module_version() is deprecated and gives no meaningfull result
* version.get_module_version() is deprecated and gives no meaningful result
* Fix version.get_module_filename() and update log lines (:phab:`T264235`)
* Re-enable printing log header (:phab:`T264235`)
* Fix result of :func:`tools.itertools.intersect_generators` (:phab:`T263947`)
Expand Down Expand Up @@ -1493,7 +1493,7 @@ Release History
* Raise ServerError also if connection to PetScan timeouts
* pagegenerators.py no longer supports 'oursql' or 'MySQLdb'. It now solely supports PyMySQL
(:phab:`T243154`, :phab:`T89976`)
* Disfunctional Family.versionnumber() method was removed
* Dysfunctional Family.versionnumber() method was removed
* Refactor login functionality (:phab:`T137805`, :phab:`T224712`, :phab:`T248767`, :phab:`T248768`, :phab:`T248945`)
* Bugfixes and improvements
* Localisation updates
Expand All @@ -1507,7 +1507,7 @@ Release History
* Refactor data attributes of Wikibase entities (:phab:`T233406`)
* Functions dealing with stars list are desupported and may be removed
* Use path's stem of script filename within pwb.py wrapper (:phab:`T248372`)
* Disfunctional cgi_interface.py was removed (:phab:`T248292`, :phab:`T248250`, :phab:`T193978`)
* Dysfunctional cgi_interface.py was removed (:phab:`T248292`, :phab:`T248250`, :phab:`T193978`)
* Fix logout on MW < 1.24 (:phab:`T214009`)
* Fixed TypeError in getFileVersionHistoryTable method (:phab:`T248266`)
* Outdated secure connection overrides were removed (:phab:`T247668`)
Expand Down Expand Up @@ -1920,7 +1920,7 @@ Release History
* Clean up issue with _WbDataPage (:phab:`T166362`)
* Re-enable xml for WikiStats with py2 (:phab:`T165830`)
* Solve httplib.IncompleteRead exception in eventstreams (:phab:`T168535`)
* Only force input_choise if self.always is given (:phab:`T161483`)
* Only force input_choice if self.always is given (:phab:`T161483`)
* Add colon when replacing category and file weblink (:phab:`T127745`)
* API Request: set uiprop only when ensuring 'userinfo' in meta (:phab:`T169202`)

Expand All @@ -1938,7 +1938,7 @@ Release History
* Implement pywikibot support for adding thanks to normal revisions (:phab:`T135409`)
* Implement server side event client EventStreams (:phab:`T158943`)
* new pagegenerators filter option -titleregexnot
* Add exception for -namepace option (:phab:`T167580`)
* Add exception for -namespace option (:phab:`T167580`)
* InteractiveReplace: Allow no replacements by default
* Encode default globe in family file
* Add on to pywikibot support for thanking normal revisions (:phab:`T135409`)
Expand Down
2 changes: 1 addition & 1 deletion docs/api_ref/pywikibot.pagegenerators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
==================================================================

.. automodule:: pagegenerators._factory
:synopsis: GeneratorFactory module wich handles pagegenerators options
:synopsis: GeneratorFactory module which handles pagegenerators options

:mod:`pagegenerators.\_filters` --- Filter Functions
====================================================
Expand Down
2 changes: 1 addition & 1 deletion docs/api_ref/pywikibot.site.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
.. automodule:: pywikibot.site._apisite

.. automodule:: pywikibot.site._extensions
:synopsis: Objects representing API interface to MediaWiki site extenstions
:synopsis: Objects representing API interface to MediaWiki site extensions

.. automodule:: pywikibot.site._generators
:synopsis: Objects representing API generators to MediaWiki site
Expand Down
2 changes: 1 addition & 1 deletion docs/library_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Explanation
:class:`pywikibot.Page` object from
:attr:`generator<bot.BaseBot.generator>`.
:15: All bot options which are passed to the bot class when
instantiating it are accessable via
instantiating it are accessible via
:class:`opt attribute<bot.OptionHandler>`. ``opt.always``,
``opt.text`` and ``opt.summary`` are all available options for this
bot class.
Expand Down
2 changes: 1 addition & 1 deletion docs/licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Pywikibot logo is Public domain but it includes material that may be
protected as a trademark. Parts of :mod:`memento<data.memento>` module
is licenced under the `BSD`_ open source software license. The
:func:`get_close_matches_ratio()<diff.get_close_matches_ratio>` function
off the :mod:`diff` module incorporates code from Pyton software which
off the :mod:`diff` module incorporates code from Python software which
is licenced under `PSF`_ license.


Expand Down
2 changes: 1 addition & 1 deletion pywikibot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def handle_args(args: Iterable[str] | None = None,
>>> local_args # doctest: +SKIP
[]
>>> local_args = pywikibot.handle_args(['-simulate', '-myoption'])
>>> local_args # global optons are handled, show the remaining
>>> local_args # global options are handled, show the remaining
['-myoption']
>>> for arg in local_args: pass # do whatever is wanted with local_args
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def register_families_folder(folder_path: str,
# scripts are displayed or if only one is found, it will be started.
# There are some configuration values to change the behavior
#
# pwb_close_matches: the maximum number of simular scripts to be found
# pwb_close_matches: the maximum number of similar scripts to be found
pwb_close_matches = 10 # must be greater than 0
# pwb_cut_off: similarity of scripts to be found
pwb_cut_off = 0.7 # must be a float in the range [0, 1]
Expand Down
4 changes: 2 additions & 2 deletions pywikibot/cosmetic_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ def resolveHtmlEntities(self, text: str) -> str:
# - used intentionally in navigation bar templates on w:de
160, # Non-breaking space (&nbsp;)
# - not supported by Firefox textareas
173, # Soft-hypen (&shy;) - enable editing
173, # Soft-hyphen (&shy;) - enable editing
8206, # Left-to-right mark (&ltr;)
8207, # Right-to-left mark (&rtl;)
]
Expand Down Expand Up @@ -927,7 +927,7 @@ def replace_link(match: Match[str]) -> str:
return text

def fixHtml(self, text: str) -> str:
"""Relace html markups with wikitext markups."""
"""Replace html markups with wikitext markups."""
def replace_header(match: Match[str]) -> str:
"""Create a header string for replacing."""
depth = int(match[1])
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/data/api/_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def result(self, pagedata: dict[str, Any]) -> pywikibot.Page:
.. versionchanged:: 9.5
No longer raise :exc:`exceptions.UnsupportedPageError` but
return a generic :class:`pywikibot.Page` obect. The exception
return a generic :class:`pywikibot.Page` object. The exception
is raised when getting the content for example.
.. versionchanged:: 9.6
Upcast to :class:`page.FilePage` if *pagedata* has
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/data/api/_paraminfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def parameter(
return None

if len(param_data) != 1:
raise RuntimeError(f'parameter data length is eiter empty or not '
raise RuntimeError(f'parameter data length is either empty or not '
f'unique.\n{param_data}')
return param_data[0]

Expand Down
8 changes: 4 additions & 4 deletions pywikibot/data/api/_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def _json_loads(self, response) -> dict | None:
"""Return a dict from requests.Response.
.. versionchanged:: 8.2
show a warning to add a ``protocoll()`` method to the family
show a warning to add a ``protocol()`` method to the family
file if suitable.
:param response: a requests.Response object
Expand Down Expand Up @@ -808,7 +808,7 @@ def _handle_warnings(self, result: dict[str, Any]) -> bool:
"""Handle warnings; return True to retry request, False to resume.
.. versionchanged:: 7.2
Return True to retry the current request and Falso to resume.
Return True to retry the current request and False to resume.
:meta public:
"""
Expand Down Expand Up @@ -1121,7 +1121,7 @@ def submit(self) -> dict:
continue

if code == 'urlshortener-blocked': # T244062
# add additional informations to error dict
# add additional information to error dict
error['current site'] = self.site
if self.site.user():
error['current user'] = self.site.user()
Expand Down Expand Up @@ -1187,7 +1187,7 @@ def _get_cache_dir(cls) -> Path:
.. versionchanged:: 8.0
return a `pathlib.Path` object.
.. versionchanged:: 9.0
remove Python main version from directoy name
remove Python main version from directory name
:return: base directory path for cache entries
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/data/superset.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def login(self) -> bool:
url = f'{self.superset_url}/login/mediawiki?next='
self.last_response = http.fetch(url)

# Test if uset has been succesfully logged in
# Test if uset has been successfully logged in
url = f'{self.superset_url}/api/v1/me/'
self.last_response = http.fetch(url)

Expand Down
2 changes: 1 addition & 1 deletion pywikibot/editor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Text editor class for your favourite editor.
.. note:: This module uses :mod:`userinterfaces.gui` and has depedencies
.. note:: This module uses :mod:`userinterfaces.gui` and has dependencies
from other partially external modules.
"""
#
Expand Down
4 changes: 2 additions & 2 deletions pywikibot/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def instance(cls):
**Examples:**
Allowing linking *to* ``pt`` 102 namespace from any other lang 0
namepace is:
namespace is:
.. code-block:: Python
Expand Down Expand Up @@ -1075,7 +1075,7 @@ def interface(self, code) -> str:
return 'DataSite'

def entity_sources(self, code: str) -> dict[str, tuple[str, str]]:
"""Provide reopsitory site information for entity types.
"""Provide repository site information for entity types.
The result must be structured as follows:
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/page/_basepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def latest_revision(self) -> pywikibot.page.Revision:
def text(self) -> str:
"""Return the current (edited) wikitext, loading it if necessary.
This property should be prefered over :meth:`get`. If the page
This property should be preferred over :meth:`get`. If the page
does not exist, an empty string will be returned. For a redirect
it returns the redirect page content and does not raise an
:exc:`exceptions.IsRedirectPageError` exception.
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/page/_filepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def download(self,
Pywikibot_MW_gear_icon.svg was downloaded.
Download a thumnail:
Download a thumbnail:
>>> file.download(url_param='120px')
True
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/page/_wikibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -2500,7 +2500,7 @@ class LexemeSense(LexemeSubEntity):
}


# Add LexemeSnese to the class attribute "types" after its declaration.
# Add LexemeSense to the class attribute "types" after its declaration.
Property.types['wikibase-sense'] = LexemeSense


Expand Down
2 changes: 1 addition & 1 deletion pywikibot/pagegenerators/_factory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""GeneratorFactory module wich handles pagegenerators options."""
"""GeneratorFactory module which handles pagegenerators options."""
#
# (C) Pywikibot team, 2008-2024
#
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/pagegenerators/_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def NewpagesPageGenerator(site: BaseSite | None = None,
:param site: Site for generator results.
:param namespaces: namespace to retrieve pages from
:param total: Maxmium number of pages to retrieve in total
:param total: Maximum number of pages to retrieve in total
"""
# API does not (yet) have a newpages function, so this tries to duplicate
# it by filtering the recentchanges output
Expand Down
10 changes: 5 additions & 5 deletions pywikibot/scripts/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.. note:: the global account must exist already before
using this.
-async Run the bot in parallel tasks, only usefull together with
-async Run the bot in parallel tasks, only useful together with
``-all`` option
.. hint:: Use :ref:`global options` ``-code``, ``-family`` or ``-site``
Expand Down Expand Up @@ -131,7 +131,7 @@ def main(*args: str) -> None:
logout = False
oauth = False
autocreate = False
asyncronous = False
asynchronous = False
unknown_args = []
for arg in pywikibot.handle_args(args):
if arg == '-all':
Expand All @@ -143,7 +143,7 @@ def main(*args: str) -> None:
elif arg == '-autocreate':
autocreate = True
elif arg == '-async':
asyncronous = True
asynchronous = True
else:
unknown_args.append(arg)

Expand All @@ -157,11 +157,11 @@ def main(*args: str) -> None:
namedict = {site.family.name: {site.code: None}}

params = oauth, logout, autocreate
context = ThreadPoolExecutor if asyncronous else nullcontext
context = ThreadPoolExecutor if asynchronous else nullcontext
with context() as executor:
for family_name in namedict:
for lang in namedict[family_name]:
if asyncronous:
if asynchronous:
executor.submit(login_one_site, lang, family_name, *params)
else:
login_one_site(lang, family_name, *params)
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/scripts/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def check_modules(script: str | None = None) -> bool:
if dependency.startswith('packaging'):
# Ignore these dependencies because ImportError is raised in an
# early state when they are imported in backports. They are already
# used at this point. This is a workaound for toolforge where some
# used at this point. This is a workaround for toolforge where some
# modules are not installed as a site-package.
# TODO: Check imports from external source
continue
Expand Down
6 changes: 3 additions & 3 deletions pywikibot/site/_apisite.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def userinfo(self) -> dict[str, Any]:
>>> 'anon' in site.userinfo
True
**Usefull alternatives to userinfo property**
**Useful alternatives to userinfo property**
- :meth:`has_group` to verify the group membership
- :meth:`has_right` to verify that the user has a given right
Expand Down Expand Up @@ -1726,7 +1726,7 @@ def get_tokens(self, types: list[str], *args, **kwargs) -> dict[str, str]:
'a9f...0a0+\\'
>>> token = site.get_tokens(['unknown']) # try an invalid token
... # doctest: +SKIP
... # invalid token names shows a warnig and the key is not in result
... # invalid token names shows a warning and the key is not in result
...
WARNING: API warning (tokens) of unknown format:
... {'warnings': 'Unrecognized value for parameter "type": foo'}
Expand Down Expand Up @@ -2045,7 +2045,7 @@ def editpage(
page requires solving a captcha
:raises CascadeLockedPageError: The page is protected with
protection cascade
:raises EditConflictError: an edit confict occurred
:raises EditConflictError: an edit conflict occurred
:raises Error: No text to be saved or API editing not enabled on
site or user is not authorized to edit, create pages or
create image redirects on site or bot is not logged in and
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/site/_datasite.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def geo_shape_repository(self):
return None

def tabular_data_repository(self):
"""Return Site object for the tabular-datas repository e.g. commons."""
"""Return Site object for the tabular-data repository e.g. commons."""
url = self.siteinfo['general'].get(
'wikibase-tabulardatastoragebaseurl')
if url:
Expand Down
Loading

0 comments on commit a90ec21

Please sign in to comment.