Skip to content

Commit 1bccd5a

Browse files
committed
Updates .gitignore for modern Python environments
1 parent c188abf commit 1bccd5a

File tree

1 file changed

+144
-29
lines changed

1 file changed

+144
-29
lines changed

.gitignore

Lines changed: 144 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,176 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/python
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
3+
4+
### Python ###
15
# Byte-compiled / optimized / DLL files
26
__pycache__/
37
*.py[cod]
8+
*$py.class
49

510
# C extensions
611
*.so
712

813
# Distribution / packaging
914
.Python
10-
/env/
11-
/bin/
12-
/build/
13-
/develop-eggs/
14-
/dist/
15-
/eggs/
16-
/lib/
17-
/lib64/
18-
/parts/
19-
/sdist/
20-
/var/
21-
/*.egg-info/
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
28+
*.egg-info/
2229
.installed.cfg
2330
*.egg
24-
src/*.egg-info/
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
2538

2639
# Installer logs
2740
pip-log.txt
2841
pip-delete-this-directory.txt
2942

3043
# Unit test / coverage reports
31-
/htmlcov/
32-
/.tox/
44+
htmlcov/
45+
.tox/
46+
.nox/
3347
.coverage
48+
.coverage.*
3449
.cache
3550
nosetests.xml
3651
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
3757

3858
# Translations
3959
*.mo
40-
41-
# Mr Developer
42-
.mr.developer.cfg
43-
.project
44-
.pydevproject
45-
46-
# Rope
47-
.ropeproject
60+
*.pot
4861

4962
# Django stuff:
5063
*.log
51-
*.pot
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
5274

5375
# Sphinx documentation
54-
/docs/_build/
76+
docs/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
# .python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# poetry
102+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103+
# This is especially recommended for binary packages to ensure reproducibility, and is more
104+
# commonly ignored for libraries.
105+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106+
#poetry.lock
107+
108+
# pdm
109+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110+
#pdm.lock
111+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112+
# in version control.
113+
# https://pdm.fming.dev/#use-with-ide
114+
.pdm.toml
115+
116+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117+
__pypackages__/
118+
119+
# Celery stuff
120+
celerybeat-schedule
121+
celerybeat.pid
122+
123+
# SageMath parsed files
124+
*.sage.py
125+
126+
# Environments
127+
.env
128+
.venv
129+
env/
130+
venv/
131+
ENV/
132+
env.bak/
133+
venv.bak/
134+
135+
# Spyder project settings
136+
.spyderproject
137+
.spyproject
138+
139+
# Rope project settings
140+
.ropeproject
141+
142+
# mkdocs documentation
143+
/site
144+
145+
# mypy
146+
.mypy_cache/
147+
.dmypy.json
148+
dmypy.json
149+
150+
# Pyre type checker
151+
.pyre/
152+
153+
# pytype static type analyzer
154+
.pytype/
155+
156+
# Cython debug symbols
157+
cython_debug/
158+
159+
# PyCharm
160+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162+
# and can be added to the global gitignore or merged into this file. For a more nuclear
163+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
164+
#.idea/
165+
166+
### Python Patch ###
167+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
168+
poetry.toml
55169

56-
*.iml
170+
# ruff
171+
.ruff_cache/
57172

58-
*COMMIT_MSG
173+
# LSP config files
174+
pyrightconfig.json
59175

60-
# QuickBuild
61-
.qbcache/
176+
# End of https://www.toptal.com/developers/gitignore/api/python

0 commit comments

Comments
 (0)