Skip to content

Add ANN rule for ruff#455

Merged
mathialo merged 3 commits intomasterfrom
ann-rule
Jul 4, 2025
Merged

Add ANN rule for ruff#455
mathialo merged 3 commits intomasterfrom
ann-rule

Conversation

@mathialo
Copy link
Copy Markdown
Contributor

@mathialo mathialo commented Jul 4, 2025

Adding the annotation rule, which requires type annotations everywhere, and disallows certain shortcuts, like using Any to get around typing.

I had to be quite liberal with the exemptions, some of the fixes would be quite large and potentially breaking. Such as making the state stores generic over the type of state instead of just using Any everywhere.

mathialo added 3 commits July 4, 2025 10:05
Adding the annotation rule, which requires type annotations everywhere,
and disallows certain shortcuts, like using `Any` to get around typing.

I had to be quite liberal with the exemptions, some of the fixes would
be quite large and potentially breaking. Such as making the state stores
generic over the type of state instead of just using `Any` everywhere.
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 4, 2025

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.02%. Comparing base (cf88b54) to head (41c7fd6).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cognite/extractorutils/util.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #455      +/-   ##
==========================================
+ Coverage   78.00%   78.02%   +0.01%     
==========================================
  Files          42       42              
  Lines        3624     3627       +3     
==========================================
+ Hits         2827     2830       +3     
  Misses        797      797              
Files with missing lines Coverage Δ
cognite/extractorutils/_inner_util.py 94.73% <100.00%> (ø)
cognite/extractorutils/base.py 57.14% <ø> (ø)
cognite/extractorutils/configtools/elements.py 80.14% <100.00%> (+0.04%) ⬆️
cognite/extractorutils/configtools/loaders.py 84.09% <100.00%> (ø)
cognite/extractorutils/exceptions.py 77.77% <100.00%> (ø)
cognite/extractorutils/metrics.py 92.80% <100.00%> (ø)
cognite/extractorutils/statestore/watermark.py 92.66% <ø> (ø)
cognite/extractorutils/threading.py 78.94% <100.00%> (ø)
...xtractorutils/unstable/configuration/exceptions.py 90.00% <100.00%> (ø)
...te/extractorutils/unstable/configuration/models.py 84.70% <100.00%> (ø)
... and 12 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mathialo mathialo marked this pull request as ready for review July 4, 2025 10:07
@mathialo mathialo requested a review from a team as a code owner July 4, 2025 10:07
@einarmo
Copy link
Copy Markdown
Contributor

einarmo commented Jul 4, 2025

🦄

@mathialo mathialo merged commit 308828c into master Jul 4, 2025
6 checks passed
@mathialo mathialo deleted the ann-rule branch July 4, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants