Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 Clean up redundant code #858

Merged
merged 6 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tests/test_completion/test_completion_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ def test_completion_install_fish():
assert "Completion will take effect once you restart the terminal" in result.stdout


runner = CliRunner()
app = typer.Typer()
app.command()(mod.main)


def test_completion_install_powershell():
completion_path: Path = (
Path.home() / ".config/powershell/Microsoft.PowerShell_profile.ps1"
Expand Down
3 changes: 1 addition & 2 deletions typer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ def solve_typer_info_help(typer_info: TyperInfo) -> str:

def solve_typer_info_defaults(typer_info: TyperInfo) -> TyperInfo:
values: Dict[str, Any] = {}
name = None
for name, value in typer_info.__dict__.items():
# Priority 1: Value was set in app.add_typer()
if not isinstance(value, DefaultPlaceholder):
Expand Down Expand Up @@ -815,7 +814,7 @@ def get_click_param(
else:
default_value = param.default
parameter_info = OptionInfo()
annotation: Any = Any
annotation: Any
if not param.annotation == param.empty:
annotation = param.annotation
else:
Expand Down
Loading