tsl/.pre-commit-config.yaml

90 lines
2.9 KiB
YAML
Raw Normal View History

repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
exclude: '^(third_party)/'
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
- id: check-added-large-files
args: ['--maxkb=100']
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
exclude: '^(third_party/)|(body/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(selfdrive/ui/translations/.*.ts)|(poetry.lock)'
args:
# if you've got a short variable name that's getting flagged, add it here
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
exclude: '^(third_party/)|(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)'
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(selfdrive/debug/)/'
additional_dependencies: ['flake8-no-implicit-concat']
args:
- --indent-size=2
- --enable-extensions=NIC
- --select=F,E112,E113,E304,E502,E701,E702,E703,E71,E72,E731,W191,W6
- --statistics
- -j4
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: '^(third_party/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(laika_repo/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)'
args:
- -j0
- -rn
- -sn
- --rcfile=.pylintrc
- repo: local
hooks:
- id: cppcheck
name: cppcheck
entry: cppcheck
language: system
types: [c++]
exclude: '^(third_party/)|(cereal/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)'
args:
- --error-exitcode=1
- --language=c++
- --quiet
- --force
- -j8
- repo: local
hooks:
- id: test_translations
name: test translations
entry: selfdrive/ui/tests/test_translations.py
language: script
pass_filenames: false
Pipenv -> poetry (#24858) * Try poetry * Remove casadi for now * Update docker * Copy pipfiles * add casadi back * Too many slashes * New poetry api * Install system * Try again * No more pipenv * new dependencies * updates * poetry 1.2.1, install dev dependencies * keep install pipenv for xx for now? * add pre-commit checks for poetry * poetry lock is too slow * update pip * migrate to poetry groups * update lockfile * don't need to specify dev group unless it is made optional * always install poetry * set POETRY_VIRTUALENVS_CREATE instead, and use pipenv for xx * use env for docs docker image * alphabetical * poetry 1.2.2 * add dev dependencies for typing added in aacf6ae3 * remove constraint * fix PIPENV_SYSTEM * remove constraint * don't need this here * bump * bump pipenv adds support for installing local pyprojects (can add openpilot as dependency of xx) * README improvements * probably not necessary * bump pip * maybe not necessary? * revert * don't install openpilot itself into the virtual env * remove PySide2 and shiboken2 reverts 3e41c775cbf670740ac648a8614d2d6b433312fe * remove Pipenv, add xx dependencies, sync system python * add pipenv as xx dep * semver package constraints, use old lockfile versions * fix casadi * remove whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * disable poetry cache * cleanup * prefer config file Co-authored-by: Cameron Clough <cameronjclough@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: a98d105cb95a445f5ec69e783585c56604b09449
2022-10-22 07:23:56 +08:00
- repo: https://github.com/python-poetry/poetry
rev: '1.5.0'
Pipenv -> poetry (#24858) * Try poetry * Remove casadi for now * Update docker * Copy pipfiles * add casadi back * Too many slashes * New poetry api * Install system * Try again * No more pipenv * new dependencies * updates * poetry 1.2.1, install dev dependencies * keep install pipenv for xx for now? * add pre-commit checks for poetry * poetry lock is too slow * update pip * migrate to poetry groups * update lockfile * don't need to specify dev group unless it is made optional * always install poetry * set POETRY_VIRTUALENVS_CREATE instead, and use pipenv for xx * use env for docs docker image * alphabetical * poetry 1.2.2 * add dev dependencies for typing added in aacf6ae3 * remove constraint * fix PIPENV_SYSTEM * remove constraint * don't need this here * bump * bump pipenv adds support for installing local pyprojects (can add openpilot as dependency of xx) * README improvements * probably not necessary * bump pip * maybe not necessary? * revert * don't install openpilot itself into the virtual env * remove PySide2 and shiboken2 reverts 3e41c775cbf670740ac648a8614d2d6b433312fe * remove Pipenv, add xx dependencies, sync system python * add pipenv as xx dep * semver package constraints, use old lockfile versions * fix casadi * remove whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * disable poetry cache * cleanup * prefer config file Co-authored-by: Cameron Clough <cameronjclough@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: a98d105cb95a445f5ec69e783585c56604b09449
2022-10-22 07:23:56 +08:00
hooks:
- id: poetry-check
- id: poetry-lock
name: validate poetry lock
args:
- --check