mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Add check to enforce literal syntax for Python builtin types
This check requires authors to initialize empty or zero builtin types
using the literal syntax (e.g., `{}` instead of `dict()`).
Authors may ignore this requirement for certain builtins using the
`--ignore` option.
Authors may also forbid calling `dict()` with keyword arguments
(`dict(a=1, b=2)`) using the `--no-allow-dict-kwargs` flag.
This commit is contained in:
parent
e718847ccb
commit
35996b7a25
8 changed files with 231 additions and 0 deletions
|
|
@ -16,6 +16,12 @@
|
|||
entry: upgrade-your-pre-commit-version
|
||||
files: ''
|
||||
minimum_pre_commit_version: 0.15.0
|
||||
- id: check-builtin-literals
|
||||
language: system
|
||||
name: upgrade-your-pre-commit-version
|
||||
entry: upgrade-your-pre-commit-version
|
||||
files: ''
|
||||
minimum_pre_commit_version: 0.15.0
|
||||
- id: check-byte-order-marker
|
||||
language: system
|
||||
name: upgrade-your-pre-commit-version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue