From 37975ed05c09d5365c8397c845c713741a76e7ee Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 1 Feb 2024 14:15:12 +0100 Subject: [PATCH] Fix type annotation for `import_model_module` (#2282) The second argument never was optional. Not sure whether there would be any good default value. --- python/sdist/amici/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sdist/amici/__init__.py b/python/sdist/amici/__init__.py index b06ea6d0f3..204933565f 100644 --- a/python/sdist/amici/__init__.py +++ b/python/sdist/amici/__init__.py @@ -13,7 +13,7 @@ import sys from pathlib import Path from types import ModuleType as ModelModule -from typing import Any, Callable, Optional, Union +from typing import Any, Callable, Union def _get_amici_path(): @@ -153,7 +153,7 @@ def __exit__(self, exc_type, exc_value, traceback): def import_model_module( - module_name: str, module_path: Optional[Union[Path, str]] = None + module_name: str, module_path: Union[Path, str] ) -> ModelModule: """ Import Python module of an AMICI model