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
|
||||
"""
|
||||
|
||||
result = c.run('cd "{path}" && python3 manage.py {cmd}'.format(
|
||||
c.run('cd "{path}" && python3 manage.py {cmd}'.format(
|
||||
path=managePyDir(),
|
||||
cmd=cmd
|
||||
), pty=pty)
|
||||
|
||||
|
||||
@task
|
||||
def plugins(c):
|
||||
"""
|
||||
@ -83,6 +84,7 @@ def plugins(c):
|
||||
# Install the plugins
|
||||
c.run(f"pip3 install -U -r '{plugin_file}'")
|
||||
|
||||
|
||||
@task(post=[plugins])
|
||||
def install(c):
|
||||
"""
|
||||
@ -94,6 +96,7 @@ def install(c):
|
||||
# Install required Python packages with PIP
|
||||
c.run('pip3 install -U -r requirements.txt')
|
||||
|
||||
|
||||
@task
|
||||
def setup_dev(c):
|
||||
"""
|
||||
@ -111,6 +114,7 @@ def setup_dev(c):
|
||||
# Update all the hooks
|
||||
c.run('pre-commit autoupdate')
|
||||
|
||||
|
||||
@task
|
||||
def shell(c):
|
||||
"""
|
||||
@ -452,7 +456,7 @@ def delete_data(c, force=False):
|
||||
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:
|
||||
manage(c, 'flush --noinput')
|
||||
|
Loading…
Reference in New Issue
Block a user