From 50195ec8d1052d2b7a80f47a3709ebc4e74d6764 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Mon, 14 Feb 2022 12:24:00 -0700 Subject: use PEP 589 syntax for TypeDict (#1253) Use PEP 589 syntax for TypeDict annotation. Also fixes previously broken typing MetaSchema typing implementation. --- tests/unittests/config/test_schema.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'tests') diff --git a/tests/unittests/config/test_schema.py b/tests/unittests/config/test_schema.py index 2f43d9e7..1d48056a 100644 --- a/tests/unittests/config/test_schema.py +++ b/tests/unittests/config/test_schema.py @@ -420,20 +420,18 @@ class GetSchemaDocTest(CiTestCase): "frequency": "frequency", "distros": ["debian", "rhel"], } - self.meta = MetaSchema( - { - "title": "title", - "description": "description", - "id": "id", - "name": "name", - "frequency": "frequency", - "distros": ["debian", "rhel"], - "examples": [ - 'ex1:\n [don\'t, expand, "this"]', - "ex2: true", - ], - } - ) + self.meta: MetaSchema = { + "title": "title", + "description": "description", + "id": "id", + "name": "name", + "frequency": "frequency", + "distros": ["debian", "rhel"], + "examples": [ + 'ex1:\n [don\'t, expand, "this"]', + "ex2: true", + ], + } def test_get_meta_doc_returns_restructured_text(self): """get_meta_doc returns restructured text for a cloudinit schema.""" -- cgit v1.2.3