mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add pre-commit
This commit is contained in:
parent
432fd9b8e6
commit
f1553337f7
11
.pre-commit-config.yaml
Normal file
11
.pre-commit-config.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
@ -39,6 +39,7 @@ inventree # Install the latest version of the Inve
|
||||
markdown==3.3.4 # Force particular version of markdown
|
||||
pep8-naming==0.11.1 # PEP naming convention extension
|
||||
pillow==9.0.1 # Image manipulation
|
||||
pre-commit==2.19.0 # Git pre-commit
|
||||
py-moneyed==0.8.0 # Specific version requirement for py-moneyed
|
||||
pygments==2.7.4 # Syntax highlighting
|
||||
python-barcode[images]==0.13.1 # Barcode generator
|
||||
|
15
tasks.py
15
tasks.py
@ -98,6 +98,19 @@ def install(c):
|
||||
# Install required Python packages with PIP
|
||||
c.run('pip3 install -U -r requirements.txt')
|
||||
|
||||
def setup_dev(c):
|
||||
"""
|
||||
Sets up everything needed for the dev enviroment
|
||||
"""
|
||||
|
||||
print("Installing required python packages from 'requirements.txt'")
|
||||
|
||||
# Install required Python packages with PIP
|
||||
c.run('pip3 install -U -r requirements.txt')
|
||||
|
||||
# Install pre-commit hook
|
||||
c.run('pre-commit install')
|
||||
|
||||
@task
|
||||
def shell(c):
|
||||
"""
|
||||
@ -253,7 +266,7 @@ def update(c):
|
||||
- static
|
||||
- clean_settings
|
||||
"""
|
||||
|
||||
|
||||
# Recompile the translation files (.mo)
|
||||
# We do not run 'invoke translate' here, as that will touch the source (.po) files too!
|
||||
manage(c, 'compilemessages', pty=True)
|
||||
|
Loading…
Reference in New Issue
Block a user