Skip to content

fix: recursion guard, format check in CI, deprecation cleanup - #62

Merged
higagan merged 2 commits into
mainfrom
fix/recursion-guard-and-format-ci
Aug 4, 2026
Merged

fix: recursion guard, format check in CI, deprecation cleanup#62
higagan merged 2 commits into
mainfrom
fix/recursion-guard-and-format-ci

Conversation

@higagan

@higagan higagan commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Three small fixes, all pre-existing on main and unrelated to the open docs PRs.

#53 — SensitiveDataFilter RecursionError on self-referential containers
_check_recursive walked dicts, lists, and tuples with no cycle guard, so a self-referential argument blew the stack. Mirrors the URLAllowList approach already in the same file: thread a seen set of id() values through the walk and skip already-visited containers. A cycle that contains a sensitive keyword is still caught.

#52 — CI does not run ruff format --check
ci.yml ran ruff check but never ruff format --check, so formatting drift landed unnoticed. cli.py and test_scan.py had drifted; both are formatted, and a Format check step is added next to Lint so the workflow fails on drift.

Deprecation cleanup
tests/test_decorator.py asserted on asyncio.iscoroutinefunction, deprecated and slated for removal in 3.16. inspect.iscoroutinefunction already covers it on the line above, so the redundant call is dropped.

100 tests pass, ruff check and ruff format --check both clean.

higagan added 2 commits August 4, 2026 20:26
_check_recursive walked dicts, lists, and tuples with no cycle guard,
so a self-referential argument blew the stack with RecursionError.
Mirror URLAllowList: thread a seen set of id() values through the
walk and skip already-visited containers. A cycle that contains a
sensitive keyword is still caught.

Also drop the redundant asyncio.iscoroutinefunction assertion in
test_decorator.py — inspect.iscoroutinefunction already covers it,
and the asyncio alias is deprecated and slated for removal in 3.16.

Closes #53.
CI ran ruff check but never ruff format --check, so formatting drift
landed on main unnoticed. cli.py and test_scan.py had drifted; both
are now formatted. Add a Format check step next to the existing Lint
step so the workflow fails if formatting slips again.

Closes #52.
@higagan
higagan merged commit 85718e1 into main Aug 4, 2026
5 checks passed
@higagan
higagan deleted the fix/recursion-guard-and-format-ci branch August 4, 2026 14:58
higagan added a commit that referenced this pull request Aug 4, 2026
higagan added a commit that referenced this pull request Aug 4, 2026
* chore: release 0.3.8

* chore: add #49 and #62 to the 0.3.8 changelog
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.

1 participant