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

Include better linting support and resolve findings from linters #38

Open
antazoey opened this issue Oct 5, 2022 · 0 comments
Open

Comments

@antazoey
Copy link
Contributor

antazoey commented Oct 5, 2022

Currently, if you run black, isort, flake8, etc, you will discover opportunities and clean up the code.

I propose we include the following files:

(.pre-commit-config.yaml):

repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.2.0
    hooks:
    -   id: check-yaml

-   repo: https://github.com/pre-commit/mirrors-isort
    rev: v5.10.1
    hooks:
      - id: isort

-   repo: https://github.com/psf/black
    rev: 22.6.0
    hooks:
      - id: black
        name: black

-   repo: https://gitlab.com/pycqa/flake8
    rev: 4.0.1
    hooks:
    -   id: flake8

-   repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.971
    hooks:
    -   id: mypy


default_language_version:
    python: python3

(pyproject.toml):

[tool.mypy]
exclude = "build/"

[tool.black]
line-length = 100
target-version = ['py39', 'py310']
include = '\.pyi?$'

[tool.isort]
line_length = 100
force_grid_wrap = 0
include_trailing_comma = true
multi_line_output = 3
use_parentheses = true

(setup.cfg):

[flake8]
max-line-length = 100
exclude =
	venv*
	docs
	build
	.eggs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant