2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-24 07:40:54 +00:00

chore: bump pre commit ()

* bump pre-commit

* auto-fixes

* ignore error

* fix a few more issues

* fix pattern
This commit is contained in:
Matthias Mair
2025-01-17 23:38:00 +01:00
committed by GitHub
parent 3d2f800c73
commit 64b9365947
17 changed files with 34 additions and 30 deletions
.pre-commit-config.yaml
contrib/container
docs/docs
pyproject.toml
src/backend/InvenTree
InvenTree
common
generic
states
machine
machine_types
plugin
base
barcodes
report
templatetags
tests.py
stock
tasks.py

@ -614,7 +614,7 @@ def update(
# If:
# - INVENTREE_DOCKER is set (by the docker image eg.) and not overridden by `--frontend` flag
# - `--no-frontend` flag is set
if (os.environ.get('INVENTREE_DOCKER', False) and not frontend) or no_frontend:
if (os.environ.get('INVENTREE_DOCKER', 'False') and not frontend) or no_frontend:
if no_frontend:
info('Skipping frontend update (no_frontend flag set)')
else:
@ -1041,7 +1041,7 @@ def test(
pty = not disable_pty
_apps = ' '.join(apps())
tested_apps = ' '.join(apps())
cmd = 'test'
@ -1050,7 +1050,7 @@ def test(
cmd += f' {runtest}'
else:
# Run all tests
cmd += f' {_apps}'
cmd += f' {tested_apps}'
if report:
cmd += ' --slowreport'
@ -1351,9 +1351,12 @@ def frontend_download(
def handle_download(url):
# download frontend-build.zip to temporary file
with requests.get(
url, headers=default_headers, stream=True, allow_redirects=True
) as response, NamedTemporaryFile(suffix='.zip') as dst:
with (
requests.get(
url, headers=default_headers, stream=True, allow_redirects=True
) as response,
NamedTemporaryFile(suffix='.zip') as dst,
):
response.raise_for_status()
# auto decode the gzipped raw data