You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with the code snippet above, pyright reports Untyped function decorator obscures type of function; ignoring decorator
The error is caused by the following overload
# variant: name omitted, cls _must_ be a keyword argument, @group(cmd=GroupCls, ...)# The _correct_ way to spell this overload is to use keyword-only argument syntax:# def group(*, cls: t.Type[GrpType], **attrs: t.Any) -> ...# However, mypy thinks this doesn't fit the overloaded function. Pyright does# accept that spelling, and the following work-around makes pyright issue a# warning that GrpType could be left unsolved, but mypy sees it as fine. *shrug*@t.overloaddefgroup(
name: None=None,
cls: t.Type[GrpType] = ...,
**attrs: t.Any,
) ->t.Callable[[_AnyCallable], GrpType]:
...
The comment suggests the author is aware of the issue ? Is there some way this could be fixed ?
This makes 8.1.5 version nearly unusable for codebases relying on pyright as a typechecker
Environment:
Python version: 3.11
Click version: 8.1.5
The text was updated successfully, but these errors were encountered:
with the code snippet above, pyright reports
Untyped function decorator obscures type of function; ignoring decorator
The error is caused by the following overload
The comment suggests the author is aware of the issue ? Is there some way this could be fixed ?
This makes 8.1.5 version nearly unusable for codebases relying on pyright as a typechecker
Environment:
The text was updated successfully, but these errors were encountered: