Skip to content

Commit

Permalink
Merge pull request #679 from asottile/pre-commit-config
Browse files Browse the repository at this point in the history
add pre-commit configuration
  • Loading branch information
hhatto committed Mar 13, 2023
2 parents 6e6d4ba + 3c1e0e4 commit ed18832
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-hooks.yaml
@@ -0,0 +1,7 @@
- id: autopep8
name: autopep8
description: A tool that automatically formats Python code to conform to the PEP 8 style guide.
entry: autopep8
language: python
types: [python]
args: [-i]
17 changes: 17 additions & 0 deletions README.rst
Expand Up @@ -384,6 +384,23 @@ configuration file example::
recursive = true
aggressive = 3

Usage with pre-commit
=====================

autopep8 can be used as a hook for pre-commit_.

To add autopep8 as a plugin, add this repo definition to your configuration:

.. code-block:: yaml
repos:
- repo: https://github.com/hhatto/autopep8
rev: ... # select the tag or revision you want, or run `pre-commit autoupdate`
hooks:
- id: autopep8
.. _`pre-commit`: https://pre-commit.com


Testing
=======
Expand Down

0 comments on commit ed18832

Please sign in to comment.