remove duplicate typing imports
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Angus L'Herrou · committed by David Lord · parent e338880 · Browse files · 3 files·+10 added−13 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+10 added−13 removed
- other:+10 added−13 removed
Provenance
- Commit
1e561ec- Tree
09037f6- Author
Angus L'Herrou <piraka@brandeis.edu>- Committer
David Lord <davidism@gmail.com>- Parent
e338880
3 files changed+10 added−13 removed
modified:src/click/core.py+8 added-9 removed
1 import enum2 import errno3 import os4 import sys5-import typing5 import typing as t6 from collections import abc7 from contextlib import contextmanager8 from contextlib import ExitStack621 unmodified lines630 if rv is None:631 self.obj = rv = object_type()632 return rv633 635- @typing.overload634+ @t.overload635 def lookup_default(636 self, name: str, call: "te.Literal[True]" = True637 ) -> t.Optional[t.Any]:638 ...639 641- @typing.overload640+ @t.overload641 def lookup_default(642 self, name: str, call: "te.Literal[False]" = ...643 ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:644 ...309 unmodified lines954 )955 956 return results957 959- @typing.overload958+ @t.overload959 def main(960 self,961 args: t.Optional[t.Sequence[str]] = None,962 prog_name: t.Optional[str] = None,2 unmodified lines965 **extra: t.Any,966 ) -> "te.NoReturn":967 ...968 970- @typing.overload969+ @t.overload970 def main(971 self,972 args: t.Optional[t.Sequence[str]] = None,973 prog_name: t.Optional[str] = None,1196 unmodified lines2170 metavar += "..."2171 2172 return metavar2173 2175- @typing.overload2174+ @t.overload2175 def get_default(2176 self, ctx: Context, call: "te.Literal[True]" = True2177 ) -> t.Optional[t.Any]:2178 ...2179 2181- @typing.overload2180+ @t.overload2181 def get_default(2182 self, ctx: Context, call: bool = ...2183 ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:2184 ...566 unmodified lines2751 help = f"{help} [{extra_str}]" if help else f"[{extra_str}]"2752 2753 return ("; " if any_prefix_is_slash else " / ").join(rv), help2754 2756- @typing.overload2755+ @t.overload2756 def get_default(2757 self, ctx: Context, call: "te.Literal[True]" = True2758 ) -> t.Optional[t.Any]:2759 ...2760 2762- @typing.overload2761+ @t.overload2762 def get_default(2763 self, ctx: Context, call: bool = ...2764 ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:2765 ...187 unmodified linesmodified:src/click/globals.py+2 added-3 removed
1-import typing1 import typing as t2 from threading import local3 4 if t.TYPE_CHECKING:2 unmodified lines7 8 _local = local()9 10 12-@typing.overload11+@t.overload12 def get_current_context(silent: "te.Literal[False]" = False) -> "Context":13 ...14 15 17-@typing.overload16+@t.overload17 def get_current_context(silent: bool = ...) -> t.Optional["Context"]:18 ...19 20 48 unmodified linesmodified:src/click/termui.py-1 removed
1 unmodified line2 import io3 import itertools4 import os5 import sys6-import typing6 import typing as t7 from gettext import gettext as _8 9 from ._compat import isatty797 unmodified lines