Skip to content

@final and ParamSpec #12033

Closed
Closed
@sobolevn

Description

@sobolevn

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

Metadata

Metadata

Assignees

Labels

bugmypy got something wrongtopic-finalPEP 591topic-paramspecPEP 612, ParamSpec, Concatenate

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions