From 999eeef8e911d3e98870180bf4b247844c33787d Mon Sep 17 00:00:00 2001 From: nico wellpott Date: Sun, 29 Jan 2023 09:50:28 +0100 Subject: [PATCH] sd --- .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ pyproject.toml | 16 ++++++++++++++++ setup.cfg | 13 +++++++++++++ setup.py | 1 + 4 files changed, 59 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..78702e6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: debug-statements + - id: name-tests-test + - id: requirements-txt-fixer + - id: check-executables-have-shebangs + - id: check-docstring-first + +- repo: https://github.com/asottile/pyupgrade + rev: v3.3.1 + hooks: + - id: pyupgrade + args: [--py310-plus] + +- repo: https://github.com/psf/black + rev: 22.12.0 + hooks: + - id: black + +- repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0bd8eaa --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[tool.black] +line-length = 120 +target-version = ['py37', 'py38'] +include = '\.pyi?$' +exclude = ''' +/( + | .eggs + | .git + | .mypy_cache + | .tox + | .venv + | _build + | build + | dist +)/ +''' diff --git a/setup.cfg b/setup.cfg index 4d5ab0c..9877296 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,9 @@ package_dir = = src include_package_data = true python_requires = >= 3.7 +[bdist_wheel] +universal = True + [options.packages.find] where = src @@ -43,3 +46,13 @@ console_scripts = testpaths = tests filterwarnings = error + +[flake8] +ignore = E501,E203 +exclude = + .git, + __pycache__, + old, + build, + dist +max-line-length = 120 diff --git a/setup.py b/setup.py index 8bf1ba9..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,2 +1,3 @@ from setuptools import setup + setup()