mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix A001 cases
This commit is contained in:
parent
78e9de2179
commit
db3db041ac
@ -59,7 +59,7 @@ ignore = [
|
||||
"B904",
|
||||
|
||||
# Remove fast
|
||||
"A001", "A002", "B018"
|
||||
"A002", "B018"
|
||||
]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
|
@ -1033,12 +1033,12 @@ class TestVersionNumber(TestCase):
|
||||
|
||||
# Check that the current .git values work too
|
||||
|
||||
hash = str(
|
||||
git_hash = str(
|
||||
subprocess.check_output('git rev-parse --short HEAD'.split()), 'utf-8'
|
||||
).strip()
|
||||
|
||||
# On some systems the hash is a different length, so just check the first 6 characters
|
||||
self.assertEqual(hash[:6], version.inventreeCommitHash()[:6])
|
||||
self.assertEqual(git_hash[:6], version.inventreeCommitHash()[:6])
|
||||
|
||||
d = (
|
||||
str(subprocess.check_output('git show -s --format=%ci'.split()), 'utf-8')
|
||||
@ -1438,8 +1438,8 @@ class BarcodeMixinTest(InvenTreeTestCase):
|
||||
'{"part": 17, "stockitem": 12}': 'c88c11ed0628eb7fef0d59b098b96975',
|
||||
}
|
||||
|
||||
for barcode, hash in hashing_tests.items():
|
||||
self.assertEqual(InvenTree.helpers.hash_barcode(barcode), hash)
|
||||
for barcode, expected in hashing_tests.items():
|
||||
self.assertEqual(InvenTree.helpers.hash_barcode(barcode), expected)
|
||||
|
||||
|
||||
class SanitizerTest(TestCase):
|
||||
|
@ -118,8 +118,8 @@ class DataImportSession(models.Model):
|
||||
"""
|
||||
mapping = {}
|
||||
|
||||
for map in self.column_mappings.all():
|
||||
mapping[map.field] = map.column
|
||||
for i in self.column_mappings.all():
|
||||
mapping[i.field] = i.column
|
||||
|
||||
return mapping
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user