Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@final and ParamSpec #12033

Closed
sobolevn opened this issue Jan 21, 2022 · 1 comment · Fixed by #12555
Closed

@final and ParamSpec #12033

sobolevn opened this issue Jan 21, 2022 · 1 comment · Fixed by #12555
Assignees
Labels
bug mypy got something wrong topic-final PEP 591 topic-paramspec PEP 612, ParamSpec, Concatenate

Comments

@sobolevn
Copy link
Member

sobolevn commented Jan 21, 2022

This code produces a strange error:

from typing import ParamSpec, Generic, final

_P = ParamSpec("_P")

@final  # E: Argument 1 to "final" has incompatible type "Type[_lru_cache_wrapper[Any]]"; expected "Type[_lru_cache_wrapper[Any]]"
class _lru_cache_wrapper(Generic[_P]):  
    pass

I will take a look, hopefully can fix it today.

Originally seen in python/typeshed#6986

@AlexWaygood
Copy link
Member

The original error for this issue is no longer reproducible following @A5rocks's PR #11847. However, I'm not sure this issue should be closed yet, since @Akuli's PR #12096 may still be worth merging, as discussed in that PR thread and #11847 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-final PEP 591 topic-paramspec PEP 612, ParamSpec, Concatenate
Projects
None yet
3 participants