Skip to content
Myr

🔥 Clean up redundant code (#858)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sofie Van Landeghem · committed by GitHub · parent 6ce2feb · Browse files · 2 files+1 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+1 added−7 removed

  • tests:+0 added−5 removed
  • other:+1 added−2 removed

2 files+1 added−7 removed

modified:tests/test_completion/test_completion_install.py-5 removed
131 unmodified lines
132 assert "completion installed in" in result.stdout133 assert "Completion will take effect once you restart the terminal" in result.stdout134135136runner = CliRunner()137app = typer.Typer()138app.command()(mod.main)139140136def test_completion_install_powershell():137 completion_path: Path = (138 Path.home() / ".config/powershell/Microsoft.PowerShell_profile.ps1"139 )
26 unmodified lines
modified:typer/main.py+1 added-2 removed
434 unmodified lines
435436437def solve_typer_info_defaults(typer_info: TyperInfo) -> TyperInfo:438 values: Dict[str, Any] = {}439 name = None439 for name, value in typer_info.__dict__.items():440 # Priority 1: Value was set in app.add_typer()441 if not isinstance(value, DefaultPlaceholder):442 values[name] = value
371 unmodified lines
814 parameter_info = ArgumentInfo()815 else:816 default_value = param.default817 parameter_info = OptionInfo()819 annotation: Any = Any818 annotation: Any819 if not param.annotation == param.empty:820 annotation = param.annotation821 else:822 annotation = str
247 unmodified lines