Add flake8-logging linting (#5620)

* added flake8-logging to make logging more robust

* fixed LOG005 warnings

* fixed LOG008 warnings

* fixed LOG011 warnings

* fixed more LOG011 errors

* added ignores for intentional logger.error calls

* fixed even more LOG011 errors
This commit is contained in:
Matthias Mair
2023-09-28 14:53:22 +10:00
committed by GitHub
parent 08e7190832
commit 71c416bafd
45 changed files with 177 additions and 176 deletions
+1 -1
View File
@@ -809,7 +809,7 @@ class PartSerializer(InvenTree.serializers.RemoteImageMixin, InvenTree.serialize
save=True
)
except IntegrityError:
logger.error(f"Could not create new PartParameter for part {instance}")
logger.exception("Could not create new PartParameter for part %s", instance)
# Create initial stock entry
if initial_stock: