Skip to content

Commit

Permalink
feat: adding pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Jan 26, 2021
1 parent e1bc3f1 commit 07c3d75
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 07c3d75

Please sign in to comment.