Skip to content

Commit aeedc9d

Browse files
committed
chore: fix mypy types
1 parent 9515184 commit aeedc9d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

mapillary_tools/config.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ def _load_config(config_path: str) -> configparser.ConfigParser:
3434
return config
3535

3636

37-
def load_user(user_name: str, config_path: str = None) -> T.Optional[types.UserItem]:
37+
def load_user(
38+
user_name: str, config_path: T.Optional[str] = None
39+
) -> T.Optional[types.UserItem]:
3840
if config_path is None:
3941
config_path = MAPILLARY_CONFIG_PATH
4042
config = _load_config(config_path)
@@ -44,7 +46,7 @@ def load_user(user_name: str, config_path: str = None) -> T.Optional[types.UserI
4446
return T.cast(types.UserItem, user_items)
4547

4648

47-
def list_all_users(config_path: str = None) -> T.List[types.UserItem]:
49+
def list_all_users(config_path: T.Optional[str] = None) -> T.List[types.UserItem]:
4850
if config_path is None:
4951
config_path = MAPILLARY_CONFIG_PATH
5052
cp = _load_config(config_path)
@@ -55,7 +57,7 @@ def list_all_users(config_path: str = None) -> T.List[types.UserItem]:
5557

5658

5759
def update_config(
58-
user_name: str, user_items: types.UserItem, config_path: str = None
60+
user_name: str, user_items: types.UserItem, config_path: T.Optional[str] = None
5961
) -> None:
6062
if config_path is None:
6163
config_path = MAPILLARY_CONFIG_PATH

mypy.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[mypy]
2-
enable_recursive_aliases = true
32

43
[mypy-tqdm.*]
54
ignore_missing_imports = True

tests/unit/test_sequence_processing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88

99
def make_image_desc(
10-
lng: float, lat: float, time: float, angle: float = None, filename: str = None
10+
lng: float,
11+
lat: float,
12+
time: float,
13+
angle: T.Optional[float] = None,
14+
filename: T.Optional[str] = None,
1115
) -> types.ImageDescriptionFileOrError:
1216
if filename is None:
1317
filename = str(uuid.uuid4())

0 commit comments

Comments
 (0)