Skip to content

Conversation

@ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Jan 21, 2026

Fix remaining ANN001 violations and remove exceptions in pyproject.toml.

Summary by CodeRabbit

  • Tests

    • Enhanced type annotations across test suite for improved code quality and reliability. Updated test fixtures and function signatures with explicit type hints to strengthen type checking and reduce potential runtime errors.
  • Chores

    • Enabled stricter type-checking rules for test files, strengthening internal code quality standards.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Walkthrough

This pull request adds explicit type annotations across multiple test files in the SDK test suite. The configuration file pyproject.toml was updated to remove type-checking exemptions (ANN001 rules) for unit test files under tests/unit/sdk/. Subsequently, test fixtures in conftest.py and test functions across several test modules received explicit type hints for parameters and return values, using TYPE_CHECKING guards for conditional imports where appropriate. The changes maintain existing test logic and behavior while improving static type information.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 32.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix ANN001 violations' directly aligns with the primary objective stated in the PR description: 'Fix remaining ANN001 violations and remove exceptions in pyproject.toml.' The changes consistently add type annotations across test files and remove ANN001 exemptions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 21, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86d4c7c
Status: ✅  Deploy successful!
Preview URL: https://774b0b4c.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-remaining-ann001.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##           stable     #753      +/-   ##
==========================================
- Coverage   80.39%   80.32%   -0.07%     
==========================================
  Files         115      115              
  Lines       10127     9888     -239     
  Branches     1624     1520     -104     
==========================================
- Hits         8142     7943     -199     
+ Misses       1431     1417      -14     
+ Partials      554      528      -26     
Flag Coverage Δ
integration-tests 41.38% <ø> (+0.05%) ⬆️
python-3.10 51.40% <ø> (-0.11%) ⬇️
python-3.11 51.42% <ø> (-0.08%) ⬇️
python-3.12 51.42% <ø> (-0.10%) ⬇️
python-3.13 51.40% <ø> (-0.11%) ⬇️
python-3.14 53.05% <ø> (-0.34%) ⬇️
python-filler-3.12 23.99% <ø> (-0.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogenstad ogenstad force-pushed the pog-remaining-ANN001 branch 3 times, most recently from f7d835e to 3e77471 Compare January 21, 2026 13:26
@ogenstad ogenstad force-pushed the pog-remaining-ANN001 branch from 3e77471 to 86d4c7c Compare January 21, 2026 13:28
@ogenstad ogenstad marked this pull request as ready for review January 21, 2026 13:57
@ogenstad ogenstad requested a review from a team January 21, 2026 13:58
@ogenstad ogenstad merged commit 2d1b586 into stable Jan 21, 2026
21 checks passed
@ogenstad ogenstad deleted the pog-remaining-ANN001 branch January 21, 2026 15:11
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.

3 participants