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 pre-commit to the list #7

Closed
datacycling opened this issue Jul 15, 2022 · 1 comment
Closed

Add pre-commit to the list #7

datacycling opened this issue Jul 15, 2022 · 1 comment

Comments

@datacycling
Copy link

Great list, thanks for putting this up.

One tool to add in the Others category would be pre-commit, sadly this tool does not support pyproject.toml ( pre-commit/pre-commit#1165 )

@flying-sheep
Copy link
Owner

flying-sheep commented Jul 15, 2022

Of course, I’m using that extensively! Thanks!

I think it’s the only tool where I prefer configuration to be elsewhere, as it’s pretty lengthy. The example in that issue is a bad faith argument though. Even without changes to the config structure, this could look much better:

[[tool.pre-commit.repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v4.0.1"
hooks = [
  {id = "trailing-whitespace"},
  {id = "end-of-file-fixer"},
  {id = "check-docstring-first"},
  {id = "check-json"},
  {id = "check-yaml"},
  {id = "debug-statements"},
  {id = "name-tests-test"},
  {id = "double-quote-string-fixer"},
]

[[tool.pre-commit.repos]]
repo = "https://github.com/PyCQA/flake8"
rev = "3.9.2"
hooks = [
 {id = "flake8", additional_dependencies = [
    "flake8-typing-imports==1.10.0",
 ]},
]

...

[[tool.pre-commit.repos]]
repo = "https://github.com/asottile/pyupgrade"
rev = "v2.16.0"
hooks = [
  {id = "pyupgrade", args = ["--py36-plus"]},
]

...

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

2 participants