Skip to content

Commit

Permalink
Small typing improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed Jan 5, 2025
1 parent 5ff4db9 commit d18a724
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion country_code_assigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CountryCodeAssigner:
__slots__ = 'used'

def __init__(self):
self.used = set()
self.used: set[str] = set()

def get_unique(self, tags: dict[str, str]) -> str:
for check_used in (True, False):
Expand Down
2 changes: 1 addition & 1 deletion openstreetmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def osm_user_has_active_block(user: dict) -> bool:

class OpenStreetMap:
def __init__(self, access_token: SecretStr):
self.access_token = access_token
self.access_token: SecretStr = access_token

@retry_exponential(10)
@trace
Expand Down
6 changes: 3 additions & 3 deletions xmltodict_postprocessor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
def xmltodict_postprocessor(_, key, value):
if key in ('@id', '@ref', '@changeset', '@uid'):
def xmltodict_postprocessor(_, key: str, value: str):
if key in {'@id', '@ref', '@changeset', '@uid'}:
return key, int(value)

if key in ('@lon, @lat'):
if key in {'@lon', '@lat'}:
return key, float(value)

if key == '@version':
Expand Down

0 comments on commit d18a724

Please sign in to comment.