Coder Social home page Coder Social logo

pygrep-hooks's Introduction

pre-commit.ci status

pygrep-hooks

A collection of fast, cheap, regex based pre-commit hooks.

Adding to your .pre-commit-config.yaml

-   repo: https://github.com/pre-commit/pygrep-hooks
    rev: v1.7.1  # Use the ref you want to point at
    hooks:
    -   id: python-use-type-annotations
    # ...

Naming conventions

Where possible, these hooks will be prefixed with the file types they target. For example, a hook which targets python will be called python-....

Provided hooks

  • python-check-blanket-noqa: Enforce that noqa annotations always occur with specific codes. Sample annotations: # noqa: F401, # noqa: F401,W203
  • python-check-mock-methods: Prevent common mistakes of assert mck.not_called(), assert mck.called_once_with(...) and mck.assert_called.
  • python-no-ipython-embed: A quick check for the ipython embed() function
  • python-no-eval: A quick check for the eval() built-in function
  • python-no-log-warn: A quick check for the deprecated .warn() method of python loggers
  • python-use-type-annotations: Enforce that python3.6+ type annotations are used instead of type comments
  • rst-backticks: Detect common mistake of using single backticks when writing rst
  • rst-directive-colons: Detect mistake of rst directive not ending with double colon
  • rst-inline-touching-normal: Detect mistake of inline code touching normal text in rst
  • text-unicode-replacement-char: Forbid files which have a UTF-8 Unicode replacement character

pygrep-hooks's People

Contributors

asottile avatar ikonst avatar pre-commit-ci[bot] avatar mik-laj avatar rcuza avatar hugovk avatar mxr avatar adityasinghhh avatar gliptak avatar rubic avatar marcogorelli avatar scop avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.