Skip to content

fix(gitignore): ignore __pycache__ at all depths (#7863)#9490

Merged
igorpecovnik merged 1 commit intomainfrom
fix/7863-gitignore-pycache
Mar 5, 2026
Merged

fix(gitignore): ignore __pycache__ at all depths (#7863)#9490
igorpecovnik merged 1 commit intomainfrom
fix/7863-gitignore-pycache

Conversation

@iav
Copy link
Contributor

@iav iav commented Mar 5, 2026

Summary

  • /__pycache__/* only covered the root-level __pycache__ directory
  • Replace with **/__pycache__/ to match any __pycache__ at any depth (e.g. lib/tools/common/__pycache__/)

Fixes #7863

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated .gitignore configuration to better handle Python bytecode cache directories across the project structure.

`/__pycache__/*` only covered the root level. Replace with `**/__pycache__/`
so that generated bytecode directories in lib/tools/ and elsewhere are ignored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@iav iav requested a review from igorpecovnik as a code owner March 5, 2026 01:50
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 79770855-6698-4ccb-b4c1-5008fc4b6a50

📥 Commits

Reviewing files that changed from the base of the PR and between ae08545 and e3f299b.

📒 Files selected for processing (1)
  • .gitignore

📝 Walkthrough

Walkthrough

Updated the .gitignore pattern for Python bytecode cache directories from a top-level-only match (/__pycache__/*) to a recursive pattern (**/__pycache__/**), enabling the rule to ignore __pycache__ directories at any depth in the repository.

Changes

Cohort / File(s) Summary
Configuration
.gitignore
Modified Python bytecode cache pattern from /__pycache__/* to **/__pycache__/** to recursively match __pycache__ directories at any directory depth, addressing untracked cache files in subdirectories like lib/tools/common/__pycache__/.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through nested trees,
Where Python caches dance with ease,
With \\/\\pycache\\/\\ in place,
No bytecode clutter mars the space! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: updating .gitignore to recursively ignore pycache directories at all depths instead of just at the root level.
Linked Issues check ✅ Passed The PR change directly addresses issue #7863 by replacing the root-level pycache pattern with a recursive pattern that matches pycache at any directory depth.
Out of Scope Changes check ✅ Passed The PR contains only the minimal change required: updating one .gitignore pattern. No other unrelated modifications are present.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/7863-gitignore-pycache

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.

@github-actions github-actions bot added size/small PR with less then 50 lines 05 Milestone: Second quarter release Needs review Seeking for review labels Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Mar 5, 2026
@igorpecovnik igorpecovnik merged commit b7af31d into main Mar 5, 2026
13 checks passed
@igorpecovnik igorpecovnik deleted the fix/7863-gitignore-pycache branch March 5, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add lib/tools/common/__pycache__ to .gitignore

2 participants