Skip to content

Conversation

@ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Jan 21, 2026

Add missing test annotations and update linting ruleset.

Summary by CodeRabbit

  • Tests

    • Enhanced type annotations across test suites for improved code quality and type safety.
  • Chores

    • Updated linting configuration to enforce type annotations in additional test files.

Note: No user-facing functionality changes in this release.

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

@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: 808494d
Status: ✅  Deploy successful!
Preview URL: https://f0ee05fb.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-unittest-annotations.infrahub-sdk-python.pages.dev

View logs

@ogenstad ogenstad force-pushed the pog-unittest-annotations branch from f4d628b to 808494d Compare January 21, 2026 10:37
@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Walkthrough

This change removes per-file lint ignore rules from pyproject.toml that previously exempted three test files from ANN001 (missing type annotation) checks. To comply with the now-enforced annotation requirements, the affected test files receive explicit type hints on their test function parameters. Changes include: adding typing.Any imports, annotating parameters with dict[str, Any], HTTPXMock, str, and BothClients types, and reformatting some function signatures to span multiple lines. No runtime logic or test behavior is altered.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% 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 accurately summarizes the main change: adding type annotations to unit test functions across three test files to improve type coverage after updating linting rules.

✏️ 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.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##           stable     #750   +/-   ##
=======================================
  Coverage   80.32%   80.32%           
=======================================
  Files         115      115           
  Lines        9888     9888           
  Branches     1520     1520           
=======================================
  Hits         7943     7943           
  Misses       1417     1417           
  Partials      528      528           
Flag Coverage Δ
integration-tests 41.38% <ø> (ø)
python-3.10 51.40% <ø> (ø)
python-3.11 51.42% <ø> (+0.02%) ⬆️
python-3.12 51.40% <ø> (-0.03%) ⬇️
python-3.13 51.42% <ø> (ø)
python-3.14 53.05% <ø> (-0.03%) ⬇️
python-filler-3.12 23.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ogenstad ogenstad marked this pull request as ready for review January 21, 2026 11:04
@ogenstad ogenstad requested a review from a team January 21, 2026 11:56
@ogenstad ogenstad merged commit ab30a34 into stable Jan 21, 2026
21 checks passed
@ogenstad ogenstad deleted the pog-unittest-annotations branch January 21, 2026 12:49
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