gitignore
gitignore copied to clipboard
Add `poetry.toml` to `Python.gitignore`
Reasons for making this change:
Poetry is a Python dependency management and packaging tool.
poetry.toml
is a local configuration file for projects powered by poetry, The settings
commonly added to this file are user-specific settings like 'cache-dir' and
'virtualenvs.path' and shouldn't be committed for everyone .
Even the poetry repository includes it in it's .gitignore
file:
https://github.com/python-poetry/poetry/blob/0d7b16f7f6f5bb63a7a507291064dd18f1ff2d93/.gitignore#L40
Links to documentation supporting these rule changes:
The documentation for poetry.toml
: https://python-poetry.org/docs/configuration/
Link to application or project’s homepage:
- https://github.com/python-poetry/poetry
- https://python-poetry.org/
I am curious if you explain the reason for the poetry toml over the lock file or if they related? https://github.com/github/gitignore/pull/3911
Fixed merge conflicts
I am curious if you explain the reason for the poetry toml over the lock file or if they related? #3911
No, poetry.toml
and poetry.lock
serve two different purposes. The former is for project specific local configurations (docs) and the latter is for dependency locking (e.g. package-lock.json
, Cargo.lock
).
+1 to this.
master
now has poetry section where this addition should go with some description comments.
https://github.com/github/gitignore/blob/d0b80a469983a7beece8fa1f5c48a8242318b531/Python.gitignore#L97