Skip to content

Commit

Permalink
Run ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Apr 5, 2024
1 parent 3dee2d9 commit d7d2911
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/tyro/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,6 @@ def _cli_impl(
if not arg.startswith("--"):
continue

delimeter = _strings.get_delimeter()
to_swap_delimeter = "-" if delimeter == "_" else "_"

if "=" in arg:
arg, _, val = arg.partition("=")
fixed = "--" + _strings.replace_delimeter_in_part(arg[2:]) + "=" + val
Expand Down
2 changes: 2 additions & 0 deletions tests/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,10 @@ def main(x: tuple = ()) -> Any:

assert tyro.cli(main, args="--x 0 1 2 3".split(" ")) == ("0", "1", "2", "3")


def test_narrowing_edge_case() -> None:
"""https://github.com/brentyi/tyro/issues/136"""

@dataclasses.dataclass
class Config:
_target: Type = dataclasses.field(default_factory=lambda: MyClass)
Expand Down

0 comments on commit d7d2911

Please sign in to comment.