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

Add isort, update black, sort and update global pylint disables #236

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions {{ cookiecutter.__dirname }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@

repos:
- repo: https://github.com/python/black
rev: 23.3.0
rev: 24.2.0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update black

hooks:
- id: black
- repo: https://github.com/PyCQA/isort
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add isort

rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/fsfe/reuse-tool
rev: v1.1.2
hooks:
Expand All @@ -24,19 +29,19 @@ repos:
name: pylint (library code)
types: [python]
args:
- --disable=consider-using-f-string
- --disable=consider-using-f-string,wrong-import-order
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add wrong-import-order (isort)

exclude: "^(docs/|examples/|tests/|setup.py$)"
- id: pylint
name: pylint (example code)
description: Run pylint rules on "examples/*.py" files
types: [python]
files: "^examples/"
args:
- --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code
- --disable=consider-using-f-string,duplicate-code,invalid-name,missing-docstring,wrong-import-order
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort and add wrong-import-order (isort)

- id: pylint
name: pylint (test code)
description: Run pylint rules on "tests/*.py" files
types: [python]
files: "^tests/"
args:
- --disable=missing-docstring,consider-using-f-string,duplicate-code
- --disable=consider-using-f-string,duplicate-code,invalid-name,missing-docstring,protected-access,wrong-import-order
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort and add invalid-name (tests have long names), protected-access (tests mess with protected things) and wrong-import-order (isort)

Loading