mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
pep fix
This commit is contained in:
parent
74726f0fda
commit
ddc4ef3c38
8
tasks.py
8
tasks.py
@ -63,11 +63,12 @@ def manage(c, cmd, pty=False):
|
|||||||
cmd - django command to run
|
cmd - django command to run
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result = c.run('cd "{path}" && python3 manage.py {cmd}'.format(
|
c.run('cd "{path}" && python3 manage.py {cmd}'.format(
|
||||||
path=managePyDir(),
|
path=managePyDir(),
|
||||||
cmd=cmd
|
cmd=cmd
|
||||||
), pty=pty)
|
), pty=pty)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def plugins(c):
|
def plugins(c):
|
||||||
"""
|
"""
|
||||||
@ -83,6 +84,7 @@ def plugins(c):
|
|||||||
# Install the plugins
|
# Install the plugins
|
||||||
c.run(f"pip3 install -U -r '{plugin_file}'")
|
c.run(f"pip3 install -U -r '{plugin_file}'")
|
||||||
|
|
||||||
|
|
||||||
@task(post=[plugins])
|
@task(post=[plugins])
|
||||||
def install(c):
|
def install(c):
|
||||||
"""
|
"""
|
||||||
@ -94,6 +96,7 @@ def install(c):
|
|||||||
# Install required Python packages with PIP
|
# Install required Python packages with PIP
|
||||||
c.run('pip3 install -U -r requirements.txt')
|
c.run('pip3 install -U -r requirements.txt')
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def setup_dev(c):
|
def setup_dev(c):
|
||||||
"""
|
"""
|
||||||
@ -111,6 +114,7 @@ def setup_dev(c):
|
|||||||
# Update all the hooks
|
# Update all the hooks
|
||||||
c.run('pre-commit autoupdate')
|
c.run('pre-commit autoupdate')
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def shell(c):
|
def shell(c):
|
||||||
"""
|
"""
|
||||||
@ -452,7 +456,7 @@ def delete_data(c, force=False):
|
|||||||
Warning: This will REALLY delete all records in the database!!
|
Warning: This will REALLY delete all records in the database!!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
print(f"Deleting all data from InvenTree database...")
|
print("Deleting all data from InvenTree database...")
|
||||||
|
|
||||||
if force:
|
if force:
|
||||||
manage(c, 'flush --noinput')
|
manage(c, 'flush --noinput')
|
||||||
|
Loading…
Reference in New Issue
Block a user