Skip to content
Myr

🐛 Fix internal type annotations and bump mypy version (#638)

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

authored by Paulo Costa · committed by GitHub · parent f83c66d · Browse files · 5 files+9 added−9 removed
This commit

State

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

Diff stats

5 files+9 added−9 removed

  • other:+9 added−9 removed

5 files+9 added−9 removed

modified:typer/_typing.py+1 added-2 removed
2 unmodified lines
3# mypy: ignore-errors45import sys6from os import PathLike7from typing import ( # type: ignore7from typing import (8 TYPE_CHECKING,9 AbstractSet,10 Any,11 ClassVar,12 Dict,13 Generator,14 Iterable,14 List,15 Mapping,16 NewType,17 Optional,
613 unmodified lines
modified:typer/completion.py+2 added-2 removed
1import os2import sys3from typing import Any, Dict, Tuple3from typing import Any, MutableMapping, Tuple45import click67from ._compat_utils import _get_click_major
111 unmodified lines
119# And to add extra error messages, for compatibility with Typer in previous versions120# This is only called in new Command method, only used by Click 8.x+121def shell_complete(122 cli: click.BaseCommand,123 ctx_args: Dict[str, Any],123 ctx_args: MutableMapping[str, Any],124 prog_name: str,125 complete_var: str,126 instruction: str,127) -> int:
33 unmodified lines
modified:typer/core.py+4 added-3 removed
7 unmodified lines
8 Any,9 Callable,10 Dict,11 List,12 MutableMapping,13 Optional,14 Sequence,15 TextIO,16 Tuple,
617 unmodified lines
634635def _typer_main_shell_completion(636 self: click.core.Command,637 *,637 ctx_args: Dict[str, Any],638 ctx_args: MutableMapping[str, Any],639 prog_name: str,640 complete_var: Optional[str] = None,641) -> None:642 if complete_var is None:
53 unmodified lines
696 _typer_format_options(self, ctx=ctx, formatter=formatter)697698 def _main_shell_completion(699 self,699 ctx_args: Dict[str, Any],700 ctx_args: MutableMapping[str, Any],701 prog_name: str,702 complete_var: Optional[str] = None,703 ) -> None:704 _typer_main_shell_completion(
53 unmodified lines
758 self.format_commands(ctx, formatter)759760 def _main_shell_completion(761 self,761 ctx_args: Dict[str, Any],762 ctx_args: MutableMapping[str, Any],763 prog_name: str,764 complete_var: Optional[str] = None,765 ) -> None:766 _typer_main_shell_completion(
30 unmodified lines
modified:typer/main.py+1 added-1 removed
49 unmodified lines
50_typer_developer_exception_attr_name = "__typer_developer_exception__"515253def except_hook(54 exc_type: Type[BaseException], exc_value: BaseException, tb: TracebackType54 exc_type: Type[BaseException], exc_value: BaseException, tb: Optional[TracebackType]55) -> None:56 exception_config: Union[DeveloperExceptionConfig, None] = getattr(57 exc_value, _typer_developer_exception_attr_name, None58 )
998 unmodified lines
modified:pyproject.toml+1 added-1 removed