mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-03 10:56:52 +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
1
setup.py
1
setup.py
|
|
@ -36,6 +36,7 @@ setup(
|
|||
'autopep8-wrapper = pre_commit_hooks.autopep8_wrapper:main',
|
||||
'check-added-large-files = pre_commit_hooks.check_added_large_files:main',
|
||||
'check-ast = pre_commit_hooks.check_ast:check_ast',
|
||||
'check-builtin-literals = pre_commit_hooks.check_builtin_literals:main',
|
||||
'check-byte-order-marker = pre_commit_hooks.check_byte_order_marker:main',
|
||||
'check-case-conflict = pre_commit_hooks.check_case_conflict:main',
|
||||
'check-docstring-first = pre_commit_hooks.check_docstring_first:main',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue