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

Incorrect assuming class property is a method #12975

Closed
Behoston opened this issue Jun 12, 2022 · 1 comment
Closed

Incorrect assuming class property is a method #12975

Behoston opened this issue Jun 12, 2022 · 1 comment
Labels
bug mypy got something wrong

Comments

@Behoston
Copy link

Bug Report

To Reproduce

class Example:
    @property
    @classmethod
    def example(cls) -> typing.List[str]:
        return ['str', 'ing', 's']
variable: typing.List[str] = Example.example

Expected Behavior
no mypy errors

Actual Behavior
error:
error: List or tuple expected as variable arguments

Your Environment

  • Mypy version used: 0.941
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.9
  • Operating system and version: Linux Mint IDK
@Behoston Behoston added the bug mypy got something wrong label Jun 12, 2022
@AlexWaygood
Copy link
Member

classmethod properties are not yet supported by mypy (see #11619), and are deprecated at runtime on 3.11+ (python/cpython#92379)

@AlexWaygood AlexWaygood closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants