-
Notifications
You must be signed in to change notification settings - Fork 63
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
Pyright vs mypy #106
Comments
For what it's worth the first thing I do after running ccp is replace all the mypy stuff with pyright. might be nice if that was one of the config options in the ccp scaffolding. |
Thanks for raising @robsys, and thanks for letting me know @szvsw. I haven't used I try to strike the right balance between opinionated and flexible in this template, but in general try to keep options limited, because for each option, the amount of variations that needs to be tested effectively doubles. However, I can see that this is something that users have different preferences over, so it probably would be good to support |
One thing to consider is that the (effectively) built in type checker within VSCode is PyRight (within Pylance): https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright It's not immediately clear what percent of VSCode users enable type checking, but it is Microsoft's out-of-the-box built-in first-class supported type checker for python, which is not nothing IMO. But yes I take your point in re not wanting to create too many options and being opinionated. If I have some time over the next month or so, I'll see if I can get familiar with how cookiecutter works so I can open a PR for pyright. Sam |
Okay, so it turns out I couldn't sleep and this is trivially easy to implement, so I opened a PR. I could use your input on how you want to set up the typechecker testing, but once that's in it should be good to go. I personally add pyright to my precommit hooks, but I think that can be left to the user. Here's an example repo with an intentional type failure: |
Okay, #125 is ready for review. |
Just wanted to open up a discussion. Have you thought about giving pyright a try instead of using
mypy
?I'm curious if you find one more favorable or effective than the other, let's discuss! What are your thoughts?
The text was updated successfully, but these errors were encountered: