Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linters and formatters #26

Open
wwade opened this issue Sep 26, 2019 · 0 comments
Open

linters and formatters #26

wwade opened this issue Sep 26, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@wwade
Copy link
Owner

wwade commented Sep 26, 2019

these day, I think the killer combo is: pipenv, python 3.7, pre-commit: flake8, black, mypy, and pyupgrade and isort

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v2.3.0
  hooks:
  - id: check-yaml
  - id: end-of-file-fixer
  - id: trailing-whitespace
  - id: check-docstring-first
  - id: flake8
    additional_dependencies: ["flake8-bugbear==19.3.0"]
- repo: https://github.com/python/black
  rev: stable
  hooks:
  - id: black
    language_version: python3
- repo: https://github.com/pre-commit/mirrors-isort
  rev: ''  # Use the revision sha / tag you want to point at
  hooks:
  - id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
  rev: v0.720
  hooks:
  - id: mypy
- repo: https://github.com/asottile/pyupgrade
  rev: v1.23.0
  hooks:
  - id: pyupgrade
    args: ["--py3-plus"]

for the .pre-commit-config.yaml

[settings]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88

for .isort.cfg (compatible with black)

[flake8]
ignore = E203, E266, E501, W503
max-line-length = 80
max-complexity = 18
select = B,C,E,F,W,T4,B9

for the .flake8

@wwade wwade added the enhancement New feature or request label Sep 26, 2019
wwade added a commit that referenced this issue Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant