-
Couldn't load subscription status.
- Fork 292
fix: enable and fix full type checking #509
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
|
@joerick Can you see if there's a setting to enable CircleCI to build on forked PRs that's disabled, perhaps? https://circleci.com/blog/triggering-trusted-ci-jobs-on-untrusted-forks/ Edit: Nevermind, it's because I pushed a new commit. |
|
I actually noticed this a couple weeks back, probably should have said something but thought I'd hold back that revelation it until things were a little quieter around here! Thank you @henryiii for performing all these fixes. This might be a good opportunity to consider which of these 'strict' rules we actually want? Although, looking at the diff it's not too crazy, I'm mostly wondering about compulsory Other that that, maybe we should define our own |
|
Returning Changing MyPy supports gradual typing, but that's mostly so you can turn it on bit by bit, not that partially typed should be a goal. I usually run PS: The |
|
I pulled out the types to a file, makes a nice simplification (especially since we only use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @henryiii ! I feel a little guilty for having somebody else tidy up my mess! Happy to leave things on strict settings for now.
It is interesting how typing changes what's considered 'neat' in programming practices. I'm thinking mostly about the Colors/Symbols thing. Generally I do think it's a good thing, but it does sometimes feel that one is being pushed in a more 'uniform'/'standard' direction (less 'fun'?).
Anyway... it would be good to get this in ASAP as there might be conflicts that would be more easily resolved sooner rather than later.
Yes. But often, that's better long-term design, easier to read/maintain, less likely to break, easier to use downstream due to the typing. While it often can be more repetitive, you also have more checks verifying that you remembered to change everything. There are special cases where "fun" is more important, and then you can just "Any"-it and go full dynamic. But that should probably be the point of the library, rather than just part of implementing something else. There's still plenty to have fun with! Restricting the rules just focuses your efforts on the important parts. |
Discovered by #507; we are currently not actually enabling any of the settings it looks like we are enabling due to a missing
.*. Fixes the various errors, and reworks the Colors/Symbols to be statically typeable.Adding pytest does slow down the type checking a bit; we could revert to ignoring pytest if the pre-commit run is too slow.
I've also added a py.typed file (not sure if it's in the SDist without a manifest), but it's nice to say we are typed, even if we don't really expect to be used as a library?
Could be simplified a bit by #508.