summaryrefslogtreecommitdiff
path: root/cloudinit/importer.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/importer.py')
-rw-r--r--cloudinit/importer.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/cloudinit/importer.py b/cloudinit/importer.py
index f84ff4da..2bc210dd 100644
--- a/cloudinit/importer.py
+++ b/cloudinit/importer.py
@@ -12,21 +12,19 @@ import sys
import typing
# annotations add value for development, but don't break old versions
-# pyver: 3.5 -> 3.8
+# pyver: 3.6 -> 3.8
# pylint: disable=E1101
-if sys.version_info >= (3, 8) and hasattr(typing, "TypeDict"):
- MetaSchema = typing.TypedDict(
- "MetaSchema",
- {
- "name": str,
- "id": str,
- "title": str,
- "description": str,
- "distros": typing.List[str],
- "examples": typing.List[str],
- "frequency": str,
- },
- )
+if sys.version_info >= (3, 8):
+
+ class MetaSchema(typing.TypedDict):
+ name: str
+ id: str
+ title: str
+ description: str
+ distros: typing.List[str]
+ examples: typing.List[str]
+ frequency: str
+
else:
MetaSchema = dict
# pylint: enable=E1101