diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..be83a3b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + name: isort (python) + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.4.2 + hooks: + - id: black + language_version: python3.11 + - repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 diff --git a/pyproject.toml b/pyproject.toml index dceaa5f..ca87496 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,8 @@ requires = ["setuptools >= 40.9.0"] build-backend = "setuptools.build_meta" +[tool.black] +line-length = 79 + [tool.isort] profile = "black" diff --git a/setup.cfg b/setup.cfg index 25e9620..499ef5a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,6 @@ console_scripts = cue_to_meta = cue_to_meta:cli [options.extras_require] test = pytest + +[flake8] +inline-quotes = double