fix for python 3.9

This commit is contained in:
wolflu05 2024-07-15 10:56:57 +02:00
parent ba925ee07e
commit 832130f6cd
No known key found for this signature in database
GPG Key ID: 9099EFC7C5EB963C

View File

@ -62,9 +62,13 @@ if sys.version_info >= (3, 11):
from typing import NotRequired
else:
class NotRequired:
class NotRequired: # pragma: no cover
"""NotRequired type helper is only supported with Python 3.11+."""
def __class_getitem__(cls, item):
"""Return the item."""
return item
class MetaMixin(models.Model):
"""A base class for InvenTree models to include shared meta fields.