Repository navigation
refactor: remove stale typing suppressions - #295
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 53 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
## Summary - Remove the stale `polylogue.sources.providers.*` mypy follow-imports override. - Replace the last broad `dataclasses.replace` ignore in filter planning with a typed callable boundary. - Remove avoidable test `type: ignore` suppressions around storage and pipeline fixtures. ## Problem The mypy campaign had shrunk the checked surface, but a stale provider override and several local ignores still obscured whether the strict contract was genuinely clean. These suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries. ## Solution Typed the filter builder replacement call explicitly, removed the obsolete mypy override, and rewrote the affected test fixtures to express their concrete mock/record contracts without `Any`-style escape hatches. The only remaining source/test/devtools `type: ignore` is the `dateparser` untyped import boundary. ## Verification - `ruff check --fix pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py` - `ruff format pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py` - `mypy polylogue tests` - `pytest -q tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py tests/unit/sources` - `devtools verify --quick` Ref #281
The mypy campaign had shrunk the checked surface, but a stale `polylogue.sources.providers.*` follow-imports override and several local `type: ignore` suppressions still obscured whether the strict contract was genuinely clean. Those suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries. Removes the stale provider override. Replaces the last broad `dataclasses.replace` ignore in filter planning with a typed callable boundary. Removes avoidable test `type: ignore` suppressions around storage and pipeline fixtures. Rewrites the affected test fixtures to express their concrete mock/record contracts without `Any`-style escape hatches. The only remaining source/test/devtools `type: ignore` is the `dateparser` untyped import boundary. Verification: ruff + mypy + pytest over storage / pipeline / sources tests; devtools verify --quick green. Ref #281
The mypy campaign had shrunk the checked surface, but a stale `polylogue.sources.providers.*` follow-imports override and several local `type: ignore` suppressions still obscured whether the strict contract was genuinely clean. Those suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries. Removes the stale provider override. Replaces the last broad `dataclasses.replace` ignore in filter planning with a typed callable boundary. Removes avoidable test `type: ignore` suppressions around storage and pipeline fixtures. Rewrites the affected test fixtures to express their concrete mock/record contracts without `Any`-style escape hatches. The only remaining source/test/devtools `type: ignore` is the `dateparser` untyped import boundary. Verification: ruff + mypy + pytest over storage / pipeline / sources tests; devtools verify --quick green. Ref #281
The mypy campaign had shrunk the checked surface, but a stale `polylogue.sources.providers.*` follow-imports override and several local `type: ignore` suppressions still obscured whether the strict contract was genuinely clean. Those suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries. Removes the stale provider override. Replaces the last broad `dataclasses.replace` ignore in filter planning with a typed callable boundary. Removes avoidable test `type: ignore` suppressions around storage and pipeline fixtures. Rewrites the affected test fixtures to express their concrete mock/record contracts without `Any`-style escape hatches. The only remaining source/test/devtools `type: ignore` is the `dateparser` untyped import boundary. Verification: ruff + mypy + pytest over storage / pipeline / sources tests; devtools verify --quick green. Ref #281
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
polylogue.sources.providers.*mypy follow-imports override.dataclasses.replaceignore in filter planning with a typed callable boundary.type: ignoresuppressions around storage and pipeline fixtures.Problem
The mypy campaign had shrunk the checked surface, but a stale provider override and several local ignores still obscured whether the strict contract was genuinely clean. These suppressions also made future type debt harder to distinguish from intentional untyped third-party boundaries.
Solution
Typed the filter builder replacement call explicitly, removed the obsolete mypy override, and rewrote the affected test fixtures to express their concrete mock/record contracts without
Any-style escape hatches. The only remaining source/test/devtoolstype: ignoreis thedateparseruntyped import boundary.Verification
ruff check --fix pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.pyruff format pyproject.toml polylogue/lib/filter_builder.py tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.pymypy polylogue testspytest -q tests/unit/storage/test_embedding_stats.py tests/unit/storage/test_parse_tracking.py tests/unit/storage/test_hybrid_laws.py tests/unit/pipeline/test_resilience.py tests/unit/sourcesdevtools verify --quickRef #281