Skip to content

Commit 8b7814d

Browse files
authored
🔥 Clean up redundant code (#858)
1 parent 6ce2feb commit 8b7814d

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

tests/test_completion/test_completion_install.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ def test_completion_install_fish():
133133
assert "Completion will take effect once you restart the terminal" in result.stdout
134134

135135

136-
runner = CliRunner()
137-
app = typer.Typer()
138-
app.command()(mod.main)
139-
140-
141136
def test_completion_install_powershell():
142137
completion_path: Path = (
143138
Path.home() / ".config/powershell/Microsoft.PowerShell_profile.ps1"

typer/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ def solve_typer_info_help(typer_info: TyperInfo) -> str:
436436

437437
def solve_typer_info_defaults(typer_info: TyperInfo) -> TyperInfo:
438438
values: Dict[str, Any] = {}
439-
name = None
440439
for name, value in typer_info.__dict__.items():
441440
# Priority 1: Value was set in app.add_typer()
442441
if not isinstance(value, DefaultPlaceholder):
@@ -816,7 +815,7 @@ def get_click_param(
816815
else:
817816
default_value = param.default
818817
parameter_info = OptionInfo()
819-
annotation: Any = Any
818+
annotation: Any
820819
if not param.annotation == param.empty:
821820
annotation = param.annotation
822821
else:

0 commit comments

Comments
 (0)