Skip to content

domdfcoding/pre-commit-hooks

Repository files navigation

pre-commit-hooks

Some useful hooks for pre-commit.

Now with 2× as many hooks!

See also: https://github.com/pre-commit/pre-commit

Tests Linux Test Status Windows Test Status macOS Test Status Coverage
Activity GitHub last commit GitHub commits since tagged version Maintenance
QA CodeFactor Grade Flake8 Status mypy status
Other License GitHub top language Requirements Status

Using pre-commit-hooks with pre-commit

Add this to your .pre-commit-config.yaml

-   repo: https://github.com/domdfcoding/pre-commit-hooks
    rev: v0.4.0  # Use the ref you want to point at
    hooks:
    -   id: requirements-txt-sorter
    # -   id: ...

Hooks available

requirements-txt-sorter Sorts PEP 508 entries in requirements.txt and removes invalid entries, including pkg-resources==0.4.0.

check-docstring-first Checks that the docstring occurs before any module code, but allows additional "docstrings", such as for documenting variables with Sphinx.

About

Some useful hooks for pre-commit.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 66