Skip to content

Commit

Permalink
appease mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Feb 18, 2025
1 parent cfe7a42 commit e4f0e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/tyro/extras/_base_configs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Any, Mapping, Optional, Sequence, Tuple, TypeVar, Union

from typing_extensions import Annotated

from tyro.conf._markers import Suppress

from .._typing import TypeForm
Expand Down Expand Up @@ -80,7 +79,7 @@ class Config:
"""
import tyro

keys = configs.keys()
keys = list(configs.keys())
return tyro.cli(
tyro.extras.subcommand_type_from_defaults(
defaults={k: configs[k][1] for k in keys},
Expand Down Expand Up @@ -162,7 +161,7 @@ def subcommand_type_from_defaults(
"""
import tyro

keys = defaults.keys()
keys = list(defaults.keys())
if sort_subcommands:
keys = sorted(keys)
return Union[ # type: ignore
Expand Down
3 changes: 1 addition & 2 deletions src/tyro/extras/_subcommand_cli_from_dict.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Any, Callable, Dict, Optional, Sequence, TypeVar, Union, overload

from typing_extensions import Annotated

from tyro.conf._markers import Marker, Suppress

from .._cli import cli
Expand Down Expand Up @@ -104,7 +103,7 @@ def subcommand_cli_from_dict(
config: Sequence of config marker objects, from :mod:`tyro.conf`.
"""

keys = subcommands.keys()
keys = list(subcommands.keys())
if sort_subcommands:
keys = sorted(keys)

Expand Down

0 comments on commit e4f0e49

Please sign in to comment.