diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..100f00368 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,51 @@ +repos: + +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.4.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: check-yaml + exclude: ^conda.recipe/meta.yaml$ + - id: debug-statements + - id: end-of-file-fixer + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace + - id: fix-encoding-pragma + + # - repo: https://github.com/psf/black + # rev: 20.8b1 + # hooks: + # - id: black + # + # - repo: https://github.com/PyCQA/isort + # rev: 5.7.0 + # hooks: + # - id: isort + # + # - repo: https://github.com/asottile/pyupgrade + # rev: v2.7.4 + # hooks: + # - id: pyupgrade + # + # - repo: https://github.com/pycqa/flake8 + # rev: 3.8.4 + # hooks: + # - id: flake8 + # exclude: docs/conf.py + # additional_dependencies: [flake8-bugbear, flake8-print] + # + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: v0.800 + # hooks: + # - id: mypy + # files: plumbum + # + # - repo: https://github.com/mgedmin/check-manifest + # rev: "0.46" + # hooks: + # - id: check-manifest + # stages: [manual] diff --git a/README.rst b/README.rst index 5ebf037ae..859c879c4 100644 --- a/README.rst +++ b/README.rst @@ -22,6 +22,9 @@ .. image:: https://badges.gitter.im/plumbumpy/Lobby.svg :alt: Join the chat at https://gitter.im/plumbumpy/Lobby :target: https://gitter.im/plumbumpy/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :alt: Code styled with Black + :target: https://github.com/psf/black Plumbum: Shell Combinators diff --git a/setup.cfg b/setup.cfg index c4e7b5414..be4c676d4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -86,3 +86,18 @@ exclude_lines = raise AssertionError raise NotImplementedError if __name__ == .__main__.: + +[mypy] +files = src +python_version = 2.7 +warn_unused_configs = True +warn_unused_ignores = True + +[flake8] +max-complexity = 12 +ignore = E203, E231, E501, E722, W503 +select = C,E,F,W,B,B9 + +[tool:isort] +profile = black +multi_line_output = 3