mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 10:35:40 +00:00
Add more checks to pre-commit (#3132)
* Add bandit to pre-commit checks * fix catchall exceptions * remove unused definitons * remove unuseed ariables * Add docstring * fix B006, B008 errors * fix B007 error * ignore B009 * Add checks for formatting and naming
This commit is contained in:
@ -24,7 +24,7 @@ print("=================================")
|
||||
|
||||
|
||||
def check_invalid_tag(data):
|
||||
|
||||
"""Check for invalid tags."""
|
||||
pattern = r"{%(\w+)"
|
||||
|
||||
err_count = 0
|
||||
@ -42,7 +42,7 @@ def check_invalid_tag(data):
|
||||
|
||||
|
||||
def check_prohibited_tags(data):
|
||||
|
||||
"""Check for prohibited tags."""
|
||||
allowed_tags = [
|
||||
'if',
|
||||
'elif',
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""
|
||||
Ensure that the release tag matches the InvenTree version number:
|
||||
"""Ensure that the release tag matches the InvenTree version number.
|
||||
|
||||
Behaviour:
|
||||
master / main branch:
|
||||
- version number must end with 'dev'
|
||||
|
||||
|
Reference in New Issue
Block a user