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

Alternative type checker support #8

Open
abelcheung opened this issue Nov 9, 2022 · 0 comments
Open

Alternative type checker support #8

abelcheung opened this issue Nov 9, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@abelcheung
Copy link
Owner

abelcheung commented Nov 9, 2022

Pyre-check

The support for PEP561 is new, so the current situation is still not fully evaluated. However some problems are immediately notable:

  • Don't understand re-exported symbols (need to import directly from the file it is defined)
  • Thinks logging.LoggerAdapter is a non-generic class
  • Fail to import external cssselect annotation
Vendor Facebook
OS MacOS, Linux
PEP561 support Yes (according to facebook/pyre-check#70 )
Max Python target 3.10

PyType

Although not officially supported, typeshed has already been successfully using PyType in test suite by importing pytype.io.parse_pyi.

Vendor Google
OS MacOS, Linux
PEP561 support Hidden (officially no, google/pytype#151 )

PyCharm

Unfortunately the situation is unsatisfactory despite having PEP561 support. There are multiple unfixed issues involving underscored attributes and methods:

Underscored class names like _Element, _ElementTree are building blocks of lxml, which can't be lived without. Annotation of many function arguments become impossible without using them. But the degree of inconvenience introduced by bugs above seriously hinder UX of developers using lxml. It even induced well-intended yet unnecessary PR on types-lxml.

For now, putting to extreme, PyCharm should be avoided like plague until relevant bugs are fixed.

Vendor JetBrains
OS Windows, MacOS, Linux
PEP561 support Yes
@abelcheung abelcheung changed the title PyType checker support PyCharm support Oct 24, 2023
@abelcheung abelcheung changed the title PyCharm support Alternative type checker support Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: On Hold
Development

No branches or pull requests

1 participant