Skip to content
Myr

Merge pull request #2155 from euresti/patch-1

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

Fix TypeVar for decorators that handle Commands

authored by David Lord · committed by GitHub · parents 490ac01, 03963b2 · Browse files · 2 files+3 added−1 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+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:src/click/decorators.py+1 added-1 removed
12 unmodified lines
13from .globals import get_current_context14from .utils import echo1516F = t.TypeVar("F", bound=t.Callable[..., t.Any])17FC = t.TypeVar("FC", t.Callable[..., t.Any], Command)17FC = t.TypeVar("FC", bound=t.Union[t.Callable[..., t.Any], Command])181920def pass_context(f: F) -> F:21 """Marks a callback as wanting to receive the current context
415 unmodified lines
modified:CHANGES.rst+2 added
5 unmodified lines
6Unreleased78- ``open_file`` recognizes ``Path("-")`` as a standard stream, the9 same as the string ``"-"``. :issue:`2106`10- The ``option`` and ``argument`` decorators preserve the type11 annotation of the decorated function. :pr:`2155`121314Version 8.0.315-------------
930 unmodified lines