Skip to content

chore: fix lint errors and modernize python syntax - #67

Merged
Cipher208 merged 2 commits into
masterfrom
fix/lint-and-modernization
Aug 7, 2026
Merged

chore: fix lint errors and modernize python syntax#67
Cipher208 merged 2 commits into
masterfrom
fix/lint-and-modernization

Conversation

@Cipher208

Copy link
Copy Markdown
Owner

This PR fixes over 300 linting errors and modernizes type annotations to use Python 3.10+ syntax (| None, list, dict).

@Cipher208
Cipher208 merged commit 81738e7 into master Aug 7, 2026
@Cipher208
Cipher208 deleted the fix/lint-and-modernization branch August 7, 2026 20:29
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Cipher208, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fb48f4ba-9773-47d2-8dbf-91fe639636a5

📥 Commits

Reviewing files that changed from the base of the PR and between d08d27a and a5e41fe.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (84)
  • .claude/CLAUDE.md
  • .pytest_cache/v/cache/lastfailed
  • .pytest_cache/v/cache/nodeids
  • core/__init__.py
  • core/episodic.py
  • core/memory.py
  • core/reflex.py
  • core/session.py
  • demo.py
  • docs/research/RESEARCH-ideas.md
  • features/audit_trail.py
  • features/auth.py
  • features/backup.py
  • features/backup_cron.py
  • features/compression.py
  • features/dashboard.py
  • features/import_export.py
  • features/rate_limiting.py
  • features/secrets.py
  • graph/epistemic.py
  • graph/temporal.py
  • hooks/registry.py
  • hooks/shared.py
  • hooks/user_hooks.py
  • lifecycle/consolidation.py
  • lifecycle/emotion_trigger.py
  • lifecycle/forgetting.py
  • lifecycle/importance_scheduler.py
  • mcp_server/registry.py
  • mcp_server/server.py
  • mcp_server/tools_layer.py
  • mcp_server/tools_ops.py
  • mcp_server/utils/circuit_breaker.py
  • mcp_server/utils/privacy.py
  • rag/conflict.py
  • rag/engine.py
  • rag/multi_source.py
  • rag/quantize.py
  • rag/router.py
  • rag/scoring.py
  • rag/search.py
  • shared/archived_memories.py
  • shared/dream_buffer.py
  • shared/embeddings.py
  • shared/importance.py
  • shared/memory_types.py
  • shared/middleware.py
  • shared/migrations.py
  • shared/read_only.py
  • shared/saga.py
  • shared/saga_crypto.py
  • shared/План перехода на aiosqlite.md
  • tests/benchmark_memory.py
  • tests/benchmark_perf.py
  • tests/test_auth_crypto.py
  • tests/test_conflict_bm25.py
  • tests/test_features/test_backup_path_safety.py
  • tests/test_features/test_import_export_path_safety.py
  • tests/test_features_coverage.py
  • tests/test_hypothesis.py
  • tests/test_importance_middleware.py
  • tests/test_importance_scheduler.py
  • tests/test_importance_v2.py
  • tests/test_mcp/test_tools_e2e.py
  • tests/test_mcp/test_tools_unit.py
  • tests/test_memory_types.py
  • tests/test_rag_chunking.py
  • tests/test_rag_no_legacy_api.py
  • tests/test_rag_scoring.py
  • tests/test_saga_behavior.py
  • tests/test_shared/test_connection.py
  • tests/test_shared/test_embeddings_unit.py
  • tests/test_shared/test_middleware_unit.py
  • tests/test_shared/test_migrations_coverage.py
  • tests/test_shared/test_read_only_coverage.py
  • tests/test_shared/test_saga_crypto_coverage.py
  • tests/test_shared/test_saga_crypto_wiring.py
  • tests/test_shared/test_saga_unit.py
  • tests/test_threshold_training.py
  • tests/test_typed_consolidation.py
  • tests/test_typed_forgetting.py
  • tests/test_wiki/test_manager.py
  • tests/test_wiki/test_path_safety.py
  • wiki/manager.py

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.

@github-actions github-actions Bot added the chore label Aug 7, 2026
@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR modernizes Python annotations and lint-sensitive constructs while preserving existing runtime behavior.

  • Replaces legacy typing aliases with built-in generics and union syntax.
  • Simplifies equivalent control flow, formatting, and exception suppression.
  • Reorders imports and updates lint-generated lock and test files.
  • Accidentally adds local pytest cache artifacts that should remain untracked.

Confidence Score: 4/5

The PR appears safe to merge after removing the accidentally committed pytest cache artifacts.

The production-code changes preserve existing behavior; the only accepted issue is non-blocking repository churn from tracking generated pytest cache state.

Files Needing Attention: .pytest_cache/v/cache/lastfailed and .pytest_cache/v/cache/nodeids

Important Files Changed

Filename Overview
shared/saga.py Modernizes formatting, annotations, conditionals, and exception suppression without changing saga persistence or recovery behavior.
mcp_server/tools_layer.py Applies typing and lint modernization while preserving tool signatures, filtering, hook invocation, and response shapes.
rag/engine.py Uses modern annotations, explicit non-strict zip behavior, and equivalent exception suppression without changing retrieval semantics.
features/auth.py Replaces legacy typing and equivalent OSError suppression without changing authentication behavior.
shared/migrations.py Rewrites ignored OperationalError handlers using contextlib.suppress with equivalent migration behavior.
.pytest_cache/v/cache/lastfailed Adds generated local failure metadata that should be removed from version control.
.pytest_cache/v/cache/nodeids Adds generated pytest collection state that will produce ongoing repository churn.

Fix All in Codex

Prompt To Fix All With AI
### Issue 1
.pytest_cache/v/cache/lastfailed:1-6
**Generated pytest cache tracked**

This adds local pytest failure and collection state to version control; subsequent test runs rewrite these generated files, creating unrelated repository churn. Remove both `.pytest_cache/v/cache/lastfailed` and `.pytest_cache/v/cache/nodeids` from the change and keep the cache ignored.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "chore: fix 300+ lint errors and moderniz..." | Re-trigger Greptile

Comment on lines +1 to +6
{
"tests/test_hypothesis.py::test_chaos_db_locked_graceful": true,
"tests/test_importance_scheduler.py::test_scheduler_rescores_big_delta": true,
"tests/test_importance_scheduler.py::test_scheduler_skips_small_delta": true,
"tests/test_importance_scheduler.py::test_scheduler_retrieval_signal_boosts": true
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Generated pytest cache tracked

This adds local pytest failure and collection state to version control; subsequent test runs rewrite these generated files, creating unrelated repository churn. Remove both .pytest_cache/v/cache/lastfailed and .pytest_cache/v/cache/nodeids from the change and keep the cache ignored.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .pytest_cache/v/cache/lastfailed
Line: 1-6

Comment:
**Generated pytest cache tracked**

This adds local pytest failure and collection state to version control; subsequent test runs rewrite these generated files, creating unrelated repository churn. Remove both `.pytest_cache/v/cache/lastfailed` and `.pytest_cache/v/cache/nodeids` from the change and keep the cache ignored.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant