-
Notifications
You must be signed in to change notification settings - Fork 24
fix: fix pyright config #505
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
Conversation
Only get the first 2 components of the server address.
I also don't understand how to change the PR title so the check doesn't say Edit: I believe it's easiest to just ignore |
Use correct syntax for ignoring directories, add some ignores for missing module sources, and configure the environment so pyright can find the modules.
I think this actually means that this line in CI:
should be pull_request_target , not pull_request . Would you be able to change that?
|
Is there a way to do that at the Lines 107 to 109 in be7596f
|
I'm pretty sure that change needs to be merged to main before this PR can go green, so I put that in #508. I don't understand these parts of the permission model in Github, so from my perspective it's quite possible the consequence of that PR being merged will be that a crocodile eats your bedpost. |
Sure, it's just to chuck in |
I was hoping that pyright had a per-module way to allow missing type hints. E.g. in Lines 107 to 109 in be7596f
fsspec module. Does pyright not have a per-module config like that?
|
Looks like CI is working now after #509! |
We're deep into the weeds of Pyright now and I'm just a regular user, so I don't know. If you look towards the end of issue 4059 in the Pyright repository, I get the impression they have sliced the problem in a different direction. I tested defining an environment that set If one needs to disable a warning for the entire importing module, I would recommend having individual ignores on the lines that need them instead so the rest of the module can benefit from those warnings. The number of imports needing the ignores is small, and the problem appears when type checking obstore itself, I don't think users of obstore will get the warnings. Additionally, the Pyright ignore annotations are not recognized by MyPy and other type checkers, so it will just be a regular comment to those. |
This is fine as-is; I was just wondering if there was an easy config setting like what mypy provides. Thanks! |
@kylebarron do you want me to make a PR that reinstates the pyright check in CI? |
Yes, that would be great; thank you! |
Use correct syntax for ignoring
directories, add some ignores
for missing module sources,
and configure the environment
so pyright can find the modules.
This discovered a type error in
conftest.py, so fix that as well.
This gives the expected output: