diff --git a/MANIFEST.in b/MANIFEST.in index 4b08baefef..9b2c42c933 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include requirements/base.in include requirements/plugins.txt recursive-include tutor/templates * +include tutor/py.typed diff --git a/tutor/py.typed b/tutor/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tutor/types.py b/tutor/types.py index 973f580c31..e2a4469f52 100644 --- a/tutor/types.py +++ b/tutor/types.py @@ -35,7 +35,10 @@ def cast_config(config: t.Any) -> Config: def get_typed( - config: Config, key: str, expected_type: t.Type[T], default: t.Optional[T] = None + config: t.Dict[str, t.Any], + key: str, + expected_type: t.Type[T], + default: t.Optional[T] = None, ) -> T: value = config.get(key, default) if not isinstance(value, expected_type):