diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..45d3836 --- /dev/null +++ b/.flake8 @@ -0,0 +1,17 @@ +[flake8] +# Ignore style and complexity +# E: style errors +# W: style warnings +# C: complexity +# F401: module imported but unused +# F403: import * +# F811: redefinition of unused `name` from line `N` +# F841: local variable assigned but never used +# E402: module level import not at top of file +# I100: Import statements are in the wrong order +# I101: Imported names are in the wrong order +ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400 +exclude = + .cache, + .github, + build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c50147c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: + - repo: https://github.com/pycqa/isort + rev: 5.6.3 + hooks: + - id: isort + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.2.1 + hooks: + - id: prettier + - repo: https://gitlab.com/pycqa/flake8 + rev: "3.8.4" + hooks: + - id: flake8 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.4.0 + hooks: + - id: end-of-file-fixer + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: requirements-txt-fixer diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6d8f08e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[tool.isort] +profile = "black" + +[tool.black] +skip-string-normalization = true +target_version = [ + "py27", + "py36", + "py37", + "py38", +]