fix ignores
This commit is contained in:
parent
130cf359e2
commit
08af7716b4
|
|
@ -494,7 +494,7 @@ class BulkCreateMixin:
|
|||
if unique_create_fields := getattr(self, 'unique_create_fields', None):
|
||||
existing = collections.defaultdict(list)
|
||||
for idx, item in enumerate(data):
|
||||
key = tuple(item[v] for v in list(unique_create_fields)) # type: ignore[not-subscriptable]
|
||||
key = tuple(item[v] for v in list(unique_create_fields)) # ty: ignore[not-subscriptable]
|
||||
existing[key].append(idx)
|
||||
|
||||
unique_errors = [[] for _ in range(len(data))]
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ class CustomUnitViewset(DataExportViewMixin, viewsets.ModelViewSet):
|
|||
return {
|
||||
'name': k,
|
||||
'is_alias': reg.get_name(k) == k,
|
||||
'compatible_units': [str(a) for a in unit.compatible_units()],
|
||||
'compatible_units': [str(a) for a in unit.compatible_units()], # ty:ignore[missing-argument]
|
||||
'isdimensionless': unit.dimensionless,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class SampleSupplierPlugin(SupplierMixin, InvenTreePlugin):
|
|||
name=p['name'],
|
||||
description=p['description'],
|
||||
exact=p['sku'] == term,
|
||||
price=f'{p["price"][1][0]:.2f}€',
|
||||
price=f'{p["price"][1][0]:.2f}€', # ty:ignore[not-subscriptable]
|
||||
link=p['link'],
|
||||
image_url=p['image_url'],
|
||||
existing_part=getattr(
|
||||
|
|
|
|||
Loading…
Reference in New Issue