Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

pre-commit/pygrep-hooks

Repository files navigation

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-hooksrev:v1.10.0# Use the ref you want to point athooks:    -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 calledpython-....

Provided hooks

  • python-check-blanket-noqa: Enforce thatnoqa annotations always occur with specific codes. Sample annotations:# noqa: F401,# noqa: F401,W203
  • python-check-blanket-type-ignore: Enforce that# type: ignore annotations always occur with specific codes. Sample annotations:# type: ignore[attr-defined],# type: ignore[attr-defined, name-defined]
  • python-check-mock-methods: Prevent common mistakes ofassert mck.not_called(),assert mck.called_once_with(...) andmck.assert_called.
  • python-no-eval: A quick check for theeval() 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 or space before the 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

About

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

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp