meta: fix type annotation of schema input

The schema input of Schema.__init__ is a python-native representation
of a JSON object, so it can be any kind of dictionary. Furthermore, it
is optional.

Fix the type to be Optional[Dict].

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
This commit is contained in:
David Rheinsberg 2022-07-25 12:20:55 +02:00 committed by Christian Kellner
parent b41e591b02
commit 4a40b732ea

View file

@ -215,7 +215,7 @@ class Schema:
schema data.
"""
def __init__(self, schema: str, name: Optional[str] = None):
def __init__(self, schema: Optional[Dict], name: Optional[str] = None):
self.data = schema
self.name = name
self._validator: Optional[jsonschema.Draft4Validator] = None