Start using pre-commit hooks.

master
junos 2023-04-24 15:38:54 +02:00
parent c66e046014
commit 76071fd550
5 changed files with 36 additions and 1 deletions

3
.flake 100644
View File

@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203

View File

@ -0,0 +1,3 @@
<component name="ProjectDictionaryState">
<dictionary name="junos" />
</component>

View File

@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3

View File

@ -14,6 +14,7 @@ dependencies:
- nodejs - nodejs
- pandas - pandas
- psycopg2 >= 2.9.1 - psycopg2 >= 2.9.1
- pre-commit
- python-dotenv - python-dotenv
- pytz - pytz
- pyprojroot - pyprojroot

7
pyproject.toml 100644
View File

@ -0,0 +1,7 @@
[tool.isort]
profile = "black"
py_version = 311
skip_gitignore = "true"
[tool.black]
target-version = ["py311"]