diff --git a/test/test_all.py b/test/test_all.py index 25d1271f..1dd6a743 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -124,7 +124,7 @@ def test_sitelinks(): def test_nositelinks(): - # this item doesn't and probably wont ever have any sitelinks (but who knows?? maybe one day..) + # this item doesn't and probably won't ever have any sitelinks (but who knows?? maybe one day..) item = wbi.item.get('Q27869338') item.claims.add(datatypes.Item(value='Q5', prop_nr='P31')) assert item.sitelinks.get('enwiki') is None diff --git a/test/test_wbi_core.py b/test/test_wbi_core.py index 95b7e3e9..402f8e14 100644 --- a/test/test_wbi_core.py +++ b/test/test_wbi_core.py @@ -88,7 +88,7 @@ def test_description(self): assert item.descriptions.get('es') == "lorem ipsum" item.descriptions.set(language='en', value="lorem ipsum", action_if_exists=ActionIfExists.KEEP) assert item.get_json()['descriptions']['en'] == {'language': 'en', 'value': 'lorem'} - # set_description on empty desription + # set_description on empty description item.descriptions = LanguageValues() item.descriptions.set(value='') item.descriptions.set(language='en', value="lorem ipsum", action_if_exists=ActionIfExists.KEEP) diff --git a/wikibaseintegrator/datatypes/globecoordinate.py b/wikibaseintegrator/datatypes/globecoordinate.py index d1b3b320..30e206ec 100644 --- a/wikibaseintegrator/datatypes/globecoordinate.py +++ b/wikibaseintegrator/datatypes/globecoordinate.py @@ -23,7 +23,7 @@ def __init__(self, latitude: float = None, longitude: float = None, altitude: fl """ Constructor, calls the superclass BaseDataType - :param latitude: Latitute in decimal format + :param latitude: Latitude in decimal format :param longitude: Longitude in decimal format :param altitude: Altitude (in decimal format?) (Always None at this moment) :param precision: Precision of the position measurement, default 1 / 3600 diff --git a/wikibaseintegrator/models/language_values.py b/wikibaseintegrator/models/language_values.py index 26f155bc..e4c20cc9 100644 --- a/wikibaseintegrator/models/language_values.py +++ b/wikibaseintegrator/models/language_values.py @@ -88,7 +88,7 @@ def from_json(self, json_data: Dict[str, Dict]) -> LanguageValues: def get_json(self) -> Dict[str, Dict]: """ - Get a formated dict who respect the Wikibase format. + Get a formatted dict who respect the Wikibase format. :return: A dict using Wikibase format. """ diff --git a/wikibaseintegrator/wbi_helpers.py b/wikibaseintegrator/wbi_helpers.py index 40937c03..e3922633 100644 --- a/wikibaseintegrator/wbi_helpers.py +++ b/wikibaseintegrator/wbi_helpers.py @@ -123,7 +123,7 @@ def mediawiki_api_call(method: str, mediawiki_api_url: str = None, session: Sess break else: # the first time I've ever used for - else!! - # else executes if the for loop completes normally. i.e. does not encouter a `break` + # else executes if the for loop completes normally. i.e. does not encounter a `break` # in this case, that means it tried this api call 10 times raise MWApiError(response.json() if response else {}) @@ -142,8 +142,8 @@ def mediawiki_api_call_helper(data: Dict[str, Any], login: _Login = None, mediaw :param user_agent: The user agent (Recommended for Wikimedia Foundation instances) :param allow_anonymous: Allow an unidentified edit to the MediaWiki API (default False) :param max_retries: The maximum number of retries - :param retry_after: The tiemout between each retry - :param maxlag: If appliable, the maximum lag allowed for the replication (An lower number reduce the load on the replicated database) + :param retry_after: The timeout between each retry + :param maxlag: If applicable, the maximum lag allowed for the replication (An lower number reduce the load on the replicated database) :param is_bot: Flag the edit as a bot :param kwargs: Any additional keyword arguments to pass to requests.request :return: The data returned by the API as a dictionary