-
Notifications
You must be signed in to change notification settings - Fork 195
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
missing type stubs for libcst.native #862
Comments
You're not supposed to call |
The normal parser crashes on our test files in flake8-trio, and presumably any time a user wants to lint code containing new grammar, so I see no reason not to always call the native parser? I suppose I could set the env var in the program before calling |
Agreed, libcst should call the native parser by default. I was hesitant to make that change, because there are some features of |
ah that's a shame, but I'll just set os.environ for now then. Better documentation does sound good, and/or adding some leading underscores / not exporting |
Yeah, I went with https://github.com/Zac-HD/shed/blob/f3653b21987172d4c7b3b369d8067116f5edc919/src/shed/_codemods.py#L39-L48 - it's a bit awkward but not too bad and |
I'm going to close this out now that #929 has been merged. |
E.g.
libcst.parse_module
is wonderfully typed, butlibcst.native.parse_module
has no stubs.I don't think it should be too bad to write
.pyi
files for the functions inlibcst.native
despite them being hooked in with PyO3?The text was updated successfully, but these errors were encountered: