Skip to content

Commit

Permalink
Fixes with codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
LeMyst committed May 30, 2022
1 parent d67fc89 commit 92a8a3d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/test_wbi_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion wikibaseintegrator/datatypes/globecoordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion wikibaseintegrator/models/language_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
6 changes: 3 additions & 3 deletions wikibaseintegrator/wbi_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {})

Expand All @@ -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
Expand Down

0 comments on commit 92a8a3d

Please sign in to comment.