2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-17 18:26:32 +00:00

Various style fixes (#5797)

* removed unused imports

* use f-string where applicable

* string format changes
This commit is contained in:
Matthias Mair
2023-10-27 00:06:48 +02:00
committed by GitHub
parent 82b376de5b
commit 20d1fa847e
29 changed files with 53 additions and 103 deletions

View File

@@ -25,7 +25,7 @@ from plugin.registry import registry
try:
from django_weasyprint import WeasyTemplateResponseMixin
except OSError as err: # pragma: no cover
print("OSError: {e}".format(e=err))
print(f"OSError: {err}")
print("You may require some further system packages to be installed.")
sys.exit(1)
@@ -109,10 +109,7 @@ class LabelTemplate(MetadataMixin, models.Model):
def __str__(self):
"""Format a string representation of a label instance"""
return "{n} - {d}".format(
n=self.name,
d=self.description
)
return f"{self.name} - {self.description}"
name = models.CharField(
blank=False, max_length=100,