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