Add ruff rules to enforce typing annotations#1197
Merged
ryneeverett merged 3 commits intoGothenburgBitFactory:developfrom Apr 10, 2026
Merged
Add ruff rules to enforce typing annotations#1197ryneeverett merged 3 commits intoGothenburgBitFactory:developfrom
ryneeverett merged 3 commits intoGothenburgBitFactory:developfrom
Conversation
Collaborator
|
Does annotating all functions necessarily improve typing coverage (as enforced by ty)? Doesn't ty complain if it can't infer a type? |
Contributor
Author
Not really, all missing annotations are replaced by See for example this piece of code: without type annotation, whereas raises an error with both All type checkers require type annotations to be fully working. Both |
ryneeverett
requested changes
Apr 9, 2026
…otifications.py - Add type annotations to all functions in the enforced files - Enforce ruff ANN rules on these files (ignore ANN401 globally) - Exclude services/, tests/, docs/ from ANN enforcement
Also add annotations for azuredevops and bitbucket, as examples
ryneeverett
approved these changes
Apr 10, 2026
13dd4f3
into
GothenburgBitFactory:develop
7 of 8 checks passed
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.
Add ruff rules ANN to ensure all functions are annotated, improving typing coverage.
First commit enforces this everywhere except
services/( +docs/andtests/, already excluded from type checking).Second commit enforces it in
services/__init__.py+ 2 services, as an example