Skip to content

Commit

Permalink
pre commit
Browse files Browse the repository at this point in the history
  • Loading branch information
haochenpan committed Jun 2, 2024
1 parent 7b1a92d commit 55379ce
Show file tree
Hide file tree
Showing 28 changed files with 1,484 additions and 1,305 deletions.
139 changes: 139 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,142 @@ test2.py
test3.py
test4.ipynb
secrets.sh


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Diaspora Web Service and Action Provider
secrets.sh
nohup.out
*.pyc
*venv*
.DS_Store

40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
ci:
autofix_prs: false
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.6.0
hooks:
- id: mixed-line-ending
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: name-tests-test
- repo: 'https://github.com/codespell-project/codespell'
rev: v2.3.0
hooks:
- id: codespell
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-ruff
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: 'https://github.com/charliermarsh/ruff-pre-commit'
rev: v0.4.5
hooks:
- id: ruff
args:
- '--fix'
- id: ruff-format
- repo: 'https://github.com/pre-commit/mirrors-mypy'
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: []
Loading

0 comments on commit 55379ce

Please sign in to comment.