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

"module __future__ is not supported in your environment" #121

Open
hmcbraida opened this issue Jan 13, 2025 · 0 comments
Open

"module __future__ is not supported in your environment" #121

hmcbraida opened this issue Jan 13, 2025 · 0 comments

Comments

@hmcbraida
Copy link

Describe the bug
from __future__ import annotations at the start of the file raises the error above.

Reproducible Code

from __future__ import annotations

class A:
    b: B

    def __init__(self, b: B) -> None:
        self.b = b

class B:
    pass

Run as pylyzer annotations.py.

Expected behavior
Should say "all checks passed"

Screenshots
image

Environment

  • Tested on Linux (Arch) and Mac
  • Python v3.13
  • Pylyzer v0.0.76 (installed from cargo on Linux, pip on Mac)

Additional context
If the annotations import is removed, no error is raised, which is also incorrect, since Python does not allow forward references without that import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant