2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Add more checks to pre-commit (#3132)

* Add bandit to pre-commit checks

* fix catchall exceptions

* remove unused definitons

* remove unuseed ariables

* Add docstring

* fix B006, B008 errors

* fix B007 error

* ignore B009

* Add checks for formatting and naming
This commit is contained in:
Matthias Mair
2022-06-06 00:56:52 +02:00
committed by GitHub
parent bbbfd003e0
commit f38386b13c
56 changed files with 154 additions and 109 deletions

View File

@ -1285,7 +1285,7 @@ class PartAPIAggregationTest(InvenTreeAPITestCase):
self.assertEqual(data['stock_item_count'], 4)
# Add some more stock items!!
for i in range(100):
for _ in range(100):
StockItem.objects.create(part=self.part, quantity=5)
# Add another stock item which is assigned to a customer (and shouldn't count)
@ -1628,7 +1628,7 @@ class BomItemTest(InvenTreeAPITestCase):
Part.objects.rebuild()
# Create some stock items for this new part
for jj in range(ii):
for _ in range(ii):
StockItem.objects.create(
part=variant,
location=loc,