Add ty for CI Type Checking#185
Merged
Merged
Conversation
6f544e2 to
ba20b1e
Compare
dea7116 to
145df2b
Compare
Collaborator
Author
|
had to rebase/force-push to sort out a merge conflict, branch-specific commits remain unchanged. |
exclude failing files from check until fixed
145df2b to
337d06a
Compare
Collaborator
Author
|
I adjusted the exclude list to individually list all failing files with the expectation that:
This essentially just modifies the behavior of the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #179
The two main fast type-checkers for Python at the moment are
tyandPyrefly, although both are still quite early in development. While searching for comparisons between the two, I found this interesting article on the subject that compares their advantages/disadvantages as well as diving into each type checker's approach to type resolution. Highly recommend reading it.I ended up selecting
tyfor type checking since it's made by Astral (the developers of theRufflinter/formatter, which we already use, and theuvpackage manager, which our project is compatible with and I personally use. I've had great experiences with all of Astral's products and from my experiences so far withty, I believe it will continue that trend. Additionally, after reading the linked article above, I thinkty's more forgiving inferred typing and significantly clearer error messages will be advantageous when trying to type current-untyped existing classes such as the GUIs.Since this PR is just for the action itself, the typing errors will need to be addressed at a later time. This would be the case regardless of which type-checker we got with.