hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.54k stars 291 forks source link

add pre-commit configuration here? #678

Closed asottile closed 1 year ago

asottile commented 1 year ago

👋 current we maintain for pre-commit a mirror for autopep8 -- would it make sense to add a pre-commit configuration here such that people can reach the repository more directly?

it shouldn't need too much maintenance -- the mirror repo hasn't really changed since onset -- basically this yaml file in the root of the repo would suffice:

# .pre-commit-hooks.yaml
-   id: autopep8
    name: autopep8
    entry: autopep8
    language: python
    types: [python]
    args: [-i]

I could then deprecate the mirror repo and point people here

hhatto commented 1 year ago

good idea 👍

Could you please make a pull request to add .pre-commit-hooks.yaml?

P.S. I will also try to introduce pre-commit in the autopep8 repository itself.

flbraun commented 11 months ago

@hhatto Could we get a new release that includes this pre-commit conf? The latest release doesn't include it yet, but the readme has been advertising pre-commit hooks ever since #679 was merged almost half a year ago.