Skip to content

Conversation

@ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Feb 10, 2026

Simplify code with linting fixes.

Summary by CodeRabbit

  • Refactor

    • Simplified conditional expressions throughout the codebase for improved readability and maintainability.
    • Refactored internal code patterns to reduce verbosity while maintaining existing functionality.
  • Chores

    • Updated linting configuration to enforce stricter code style standards.

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Walkthrough

The PR refactors multiple conditional assignments across the codebase to use single-line ternary expressions instead of multi-line if/else blocks. Changes span eight files including client utilities, CLI commands, GraphQL renderers, node relationships, templates, and test files. Additionally, the SIM108 rule is removed from the Ruff linter's ignore list in pyproject.toml. All modifications preserve existing behavior while expressing conditional logic more concisely.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change—replacing if-else blocks with ternary operators throughout multiple files in the codebase as part of a linting fix (enabling SIM108 rule).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


No actionable comments were generated in the recent review. 🎉


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 Feb 10, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9e42f1f
Status: ✅  Deploy successful!
Preview URL: https://4d4ef40a.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-sim108.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                 Coverage Diff                  @@
##           infrahub-develop     #814      +/-   ##
====================================================
+ Coverage             80.33%   80.54%   +0.21%     
====================================================
  Files                   115      117       +2     
  Lines                  9865    10209     +344     
  Branches               1504     1538      +34     
====================================================
+ Hits                   7925     8223     +298     
- Misses                 1419     1456      +37     
- Partials                521      530       +9     
Flag Coverage Δ
integration-tests 40.23% <55.55%> (-1.22%) ⬇️
python-3.10 51.88% <77.77%> (+0.50%) ⬆️
python-3.11 51.88% <77.77%> (+0.50%) ⬆️
python-3.12 51.86% <77.77%> (+0.48%) ⬆️
python-3.13 51.88% <77.77%> (+0.52%) ⬆️
python-3.14 53.58% <77.77%> (+0.55%) ⬆️
python-filler-3.12 24.05% <11.11%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
infrahub_sdk/client.py 72.88% <100.00%> (+0.88%) ⬆️
infrahub_sdk/ctl/cli_commands.py 71.77% <100.00%> (+0.57%) ⬆️
infrahub_sdk/graphql/renderers.py 92.77% <100.00%> (-0.09%) ⬇️
infrahub_sdk/node/node.py 85.67% <100.00%> (+0.64%) ⬆️
infrahub_sdk/template/__init__.py 96.74% <100.00%> (+1.39%) ⬆️
🚀 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 February 10, 2026 15:35
@ogenstad ogenstad requested a review from a team as a code owner February 10, 2026 15:35
@ogenstad ogenstad merged commit 62fcd75 into infrahub-develop Feb 11, 2026
21 checks passed
@ogenstad ogenstad deleted the pog-SIM108 branch February 11, 2026 06:54
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