Merge remote-tracking branch 'origin/8.0.x'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parents 9e9fe41, 69dfb1e · 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
e4ef249- Tree
3e53712- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
9e9fe41- Parent 2
69dfb1e
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,1150 unmodified lines2124 metavar += "..."2125 2126 return metavar2127 2129- @typing.overload2128+ @t.overload2129 def get_default(2130 self, ctx: Context, call: "te.Literal[True]" = True2131 ) -> t.Optional[t.Any]:2132 ...2133 2135- @typing.overload2134+ @t.overload2135 def get_default(2136 self, ctx: Context, call: bool = ...2137 ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:2138 ...573 unmodified lines2712 help = f"{help} [{extra_str}]" if help else f"[{extra_str}]"2713 2714 return ("; " if any_prefix_is_slash else " / ").join(rv), help2715 2717- @typing.overload2716+ @t.overload2717 def get_default(2718 self, ctx: Context, call: "te.Literal[True]" = True2719 ) -> t.Optional[t.Any]:2720 ...2721 2723- @typing.overload2722+ @t.overload2723 def get_default(2724 self, ctx: Context, call: bool = ...2725 ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:2726 ...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 isatty777 unmodified lines