Add .gitignore for Python build and tooling artifacts - #53
Open
elhoim wants to merge 1 commit into
Open
Conversation
The repository has no .gitignore, so routine local activity (running the CLI, pytest, a build, or a linter) leaves __pycache__/, *.pyc, .pytest_cache/, dist/ and similar artifacts showing as untracked files. That makes it easy to commit them by accident and noisy to review 'git status'. Adds a standard Python .gitignore covering bytecode, packaging output, test and coverage output, type-checker and linter caches, virtualenvs, editor/OS cruft, and merge leftovers. Verified that no currently tracked file matches any of the new patterns (git ls-files -i -c --exclude-standard is empty), so nothing already in the repository becomes ignored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The repository has no
.gitignore. Routine local activity — running the CLI, runningpytest, building a distribution, or invoking a linter — leaves__pycache__/,*.pyc,.pytest_cache/,dist/,*.egg-info/and similar artifacts in the working tree as untracked files.That has two costs:
git statusis noisy to read before a commit, and agit add -Aorgit commit -awill happily sweep build artifacts into a commit. Committed bytecode is version- and platform-specific (cli.cpython-314.pyc), so it is never useful to anyone else and pollutes history permanently.Change
Adds a standard Python
.gitignorecovering:__pycache__/,*.py[cod]build/,dist/,*.egg-info/,.eggs/.pytest_cache/,.tox/,.coverage*,htmlcov/.mypy_cache/,.ruff_cache/,.pytype/.venv/,venv/,ENV/.idea/,.vscode/,.DS_Store,*.swp,*.orig,*.rejNo source file is touched and nothing is removed — the repository's tracked tree and its history are both already free of build artifacts, so this is purely preventative.
Verification
git ls-files -i -c --exclude-standardreturns empty, so no existing file is silently dropped from version control by these patterns.bin/__pycache__/cli.cpython-314.pyc,.pytest_cache/,dist/pkg.whl,.coverage,.DS_Storeandfoo.orig, then confirmedgit status --porcelain --untracked-files=allreports a clean tree.python bin/cli.py --helpstill exits 0.Note on overlap
PR #18 (pytest suite + CI) includes a minimal 3-line
.gitignoreas a side effect of needing one. This PR supersedes it with the full set. Whichever merges first, the other needs only a trivial conflict resolution on that one file — no code is involved either way.🤖 Generated with Claude Code
https://claude.ai/code/session_01DYX4TKA5inzByJ4qGWKjqh