Skip to content

chore(deps): bump ruff ^0.12.3 → ^0.15.22 and openapi-python-client ^0.26.1 → ^0.29.0 (HYBIM-777)#94

Open
etserend wants to merge 4 commits into
mainfrom
feat/HYBIM-777-bump-ruff
Open

chore(deps): bump ruff ^0.12.3 → ^0.15.22 and openapi-python-client ^0.26.1 → ^0.29.0 (HYBIM-777)#94
etserend wants to merge 4 commits into
mainfrom
feat/HYBIM-777-bump-ruff

Conversation

@etserend

@etserend etserend commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps ruff and openapi-python-client together — they are coupled because openapi-python-client 0.26.x hard-caps ruff<0.14, making it impossible to resolve ruff ≥0.14 while staying on 0.26.x.

Package Before After
ruff (pyproject.toml) ^0.12.3 ^0.15.22
ruff (pre-commit hook) v0.9.7 v0.15.22
openapi-python-client ^0.26.1 ^0.29.0

These were previously bumped in PR #66, reverted in PR #78 (due to an unrelated openapi.yaml conflict), and are now re-applied cleanly.

Test plan

  • CI full test suite passes
  • poetry run ruff check src/splunk_ao/ --exclude src/splunk_ao/resources/ — no new errors

Ticket: HYBIM-777

🤖 Generated with Claude Code

etserend and others added 2 commits July 17, 2026 12:07
…0.26.1 → ^0.29.0 (HYBIM-777)

openapi-python-client 0.26.x hard-caps ruff<0.14, so both versions must
be bumped together. Also updates the ruff pre-commit hook rev to v0.15.22.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…-python-client 0.29.x output (HYBIM-777)

The 0.26.x → 0.29.x upgrade changed the generated http_validation_error.py
from_dict body structure: field init and loop ordering changed, and the
guard changed from `_detail or []` to `if _detail is not UNSET`. Update
_LOOP_RE and _loop_replacement to match the new pattern so the post-gen
hook succeeds.

Also apply ruff UP-rule auto-fixes (StrEnum, dt.UTC, import ordering) that
the bumped ruff 0.15.22 now flags.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@etserend
etserend force-pushed the feat/HYBIM-777-bump-ruff branch from 49ec893 to 2775d7b Compare July 17, 2026 17:07
…M-777)

- Remove unused `timezone` import from utils/__init__.py (F401)
- Add explicit `__hash__ = None` to schema/message.py (PLW1641)
- Add experiment.py and metric.py to per-file-ignores for PLC0415
  (local imports are intentional circular-dependency workarounds)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@etserend

Copy link
Copy Markdown
Contributor Author

Ran poetry run ruff check src/splunk_ao/ --exclude src/splunk_ao/resources/ on both branches for comparison:

Branch ruff version Errors
main 0.15.20 (system) 11 errors (pre-existing)
feat/HYBIM-777-bump-ruff 0.15.22 (pinned) 0 errors

The branch introduces no new errors — it fixes all 11 pre-existing ones on main (unused timezone import, missing __hash__ on Message, and experiment.py/metric.py missing from per-file-ignores).

@fercor-cisco fercor-cisco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.

Verdict: approve — Clean, well-scoped dependency bump; code changes correctly satisfy new ruff rules with no runtime regressions found. One non-blocking verification gap on the patch script.

Follow-ups

Suggested follow-up work that could be tracked as Shortcut stories:

  • scripts/patch_http_validation_error.py:54-101: Add a small unit test for the patch script that feeds a representative 0.29-generated from_dict body through patch() and asserts the isinstance-guarded output is produced. This turns the currently-untested regex into a regression-guarded contract and would have caught any generator drift at CI time rather than at regen time.

Comment thread scripts/patch_http_validation_error.py
Verify the 0.29 regex against a representative unpatched from_dict body,
confirm idempotency on already-patched content, and assert the committed
http_validation_error.py already carries the patch sentinel.

Addresses reviewer comment on PR #94.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@etserend

Copy link
Copy Markdown
Contributor Author

Added tests/test_patch_http_validation_error.py in 29e4de6 with 5 tests: test_patch_rewrites_0_29_loop feeds the exact 0.29-style unpatched from_dict body through patch() and asserts the isinstance-guarded output is produced; test_patch_is_idempotent confirms already-patched content is unchanged; test_patch_returns_false_for_unknown_format covers the exit-2 path; test_patch_committed_file_is_already_patched asserts the checked-in file passes the sentinel check. Any future generator drift that breaks the regex will fail CI.

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