Bump CI/pre-commit versions (#6522)

* bump CI versions
and run new autofixes

* fix reqs
This commit is contained in:
Matthias Mair 2024-02-19 23:47:57 +00:00 committed by GitHub
parent 6e932f85cf
commit ebe01530e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 12 additions and 17 deletions

View File

@ -16,7 +16,7 @@ repos:
- id: check-yaml
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.2.2
hooks:
- id: ruff-format
args: [--preview]
@ -26,7 +26,7 @@ repos:
--preview
]
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
rev: 7.4.0
hooks:
- id: pip-compile
name: pip-compile requirements-dev.in
@ -60,7 +60,7 @@ repos:
- "prettier@^2.4.1"
- "@trivago/prettier-plugin-sort-imports"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: "v9.0.0-alpha.2"
rev: "v9.0.0-beta.0"
hooks:
- id: eslint
additional_dependencies:

View File

@ -421,7 +421,7 @@ def progress_bar(val, max_val, *args, **kwargs):
style_tags.append(f'max-width: {max_width};')
html = f"""
<div id='{item_id}' class='progress' style='{" ".join(style_tags)}'>
<div id='{item_id}' class='progress' style='{' '.join(style_tags)}'>
<div class='progress-bar {style}' role='progressbar' aria-valuemin='0' aria-valuemax='100' style='width:{percent}%'></div>
<div class='progress-value'>{val} / {max_val}</div>
</div>

View File

@ -1482,7 +1482,7 @@ class OrderCalendarExport(ICalFeed):
def item_guid(self, item):
"""Return globally unique UID for event."""
return f'po_{item.pk}_{item.reference.replace(" ","-")}@{self.instance_url}'
return f'po_{item.pk}_{item.reference.replace(" ", "-")}@{self.instance_url}'
def item_link(self, item):
"""Set the item link."""

View File

@ -261,7 +261,7 @@ class InvenTreeLabelSheetPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlug
}}
.label-sheet-cell {{
border: {"1px solid #000;" if border else "0mm;"}
border: {'1px solid #000;' if border else '0mm;'}
width: {label_width}mm;
height: {label_height}mm;
padding: 0mm;

View File

@ -35,7 +35,7 @@ def check_invalid_tag(data):
for result in results:
err_count += 1
print(f' - Error on line {idx+1}: %{{{result[0]}')
print(f' - Error on line {idx + 1}: %{{{result[0]}')
return err_count
@ -62,7 +62,7 @@ def check_prohibited_tags(data):
for idx, line in enumerate(data):
for tag in re.findall(pattern, line):
if tag not in allowed_tags:
print(f" > Line {idx+1} contains prohibited template tag '{tag}'")
print(f" > Line {idx + 1} contains prohibited template tag '{tag}'")
err_count += 1
return err_count
@ -94,7 +94,7 @@ for filename in pathlib.Path(js_dynamic_dir).rglob('*.js'):
if tag in line:
err_count += 1
print(f" > Error on line {idx+1}: Prohibited tag '{tag}' found")
print(f" > Error on line {idx + 1}: Prohibited tag '{tag}' found")
if errors > 0:

View File

@ -22,9 +22,7 @@ backoff==2.2.1
# opentelemetry-exporter-otlp-proto-grpc
# opentelemetry-exporter-otlp-proto-http
bleach[css]==6.1.0
# via
# bleach
# django-markdownify
# via django-markdownify
brotli==1.1.0
# via fonttools
certifi==2024.2.2
@ -175,9 +173,7 @@ et-xmlfile==1.1.0
feedparser==6.0.11
# via -r requirements.in
fonttools[woff]==4.47.2
# via
# fonttools
# weasyprint
# via weasyprint
googleapis-common-protos==1.62.0
# via
# opentelemetry-exporter-otlp-proto-grpc
@ -304,7 +300,6 @@ pyjwt[crypto]==2.8.0
# via
# django-allauth
# djangorestframework-simplejwt
# pyjwt
pyphen==0.14.0
# via weasyprint
pypng==0.20220715.0

View File

@ -1165,7 +1165,7 @@ Then try continuing by running: invoke frontend-download --file <path-to-downloa
print('[ERROR] Cannot find frontend-build.zip attachment for current sha')
return
print(
f"Found artifact {frontend_artifact['name']} with id {frontend_artifact['id']} ({frontend_artifact['size_in_bytes']/1e6:.2f}MB)."
f"Found artifact {frontend_artifact['name']} with id {frontend_artifact['id']} ({frontend_artifact['size_in_bytes'] / 1e6:.2f}MB)."
)
print(