diff --git a/pristan/components/plugin.py b/pristan/components/plugin.py index 1340842..35cb5ce 100644 --- a/pristan/components/plugin.py +++ b/pristan/components/plugin.py @@ -10,7 +10,7 @@ from pristan.errors import NumberOfCallsError -@repred(positionals=['name']) # type: ignore[arg-type] +@repred(positionals=['name']) class Plugin(Generic[PluginResult]): # TODO: consider to delete this "type: ignore" if python 3.9 deleted from the matrix def __init__(self, name: str, plugin_function: PluginFunction[SlotPapameters, PluginResult], expected_result_type: Union[InnerNoneType, Type[Any]], type_check: bool, unique: bool, run_once: bool = False) -> None: # type: ignore[type-arg, unused-ignore] # noqa: PLR0913 diff --git a/pristan/components/slot.py b/pristan/components/slot.py index 4da3237..1674ccc 100644 --- a/pristan/components/slot.py +++ b/pristan/components/slot.py @@ -44,7 +44,7 @@ # TODO: consider to delete all the "type: ignore"d comments if python 3.9 deleted from the matrix -@repred( # type: ignore[arg-type] +@repred( positionals=['slot_function'], filters={ 'signature': not_none, diff --git a/pristan/components/slot_code_representer.py b/pristan/components/slot_code_representer.py index 3dd01c6..61f1026 100644 --- a/pristan/components/slot_code_representer.py +++ b/pristan/components/slot_code_representer.py @@ -27,7 +27,7 @@ sentinel = InnerNoneType() -@repred(prefer_positional=True) # type: ignore[arg-type] +@repred(prefer_positional=True) class SlotCodeRepresenter: def __init__(self, function: Callable[..., Any]) -> None: self.function = function diff --git a/pyproject.toml b/pyproject.toml index 46659d0..48db921 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,17 +4,17 @@ build-backend = "setuptools.build_meta" [project] name = "pristan" -version = "0.0.11" +version = "0.0.12" authors = [{ name = "Evgeniy Blinov", email = "zheni-b@yandex.ru" }] description = "Function-based plugin system with respect to typing" readme = "README.md" requires-python = ">=3.8" dependencies = [ - 'sigmatch>=0.0.9', + 'sigmatch>=0.0.10', 'simtypes>=0.0.13', 'denial>=0.0.13', - 'printo>=0.0.26', - 'getsources>=0.0.3', + 'printo>=0.0.27', + 'getsources>=0.0.4', 'packaging>=26.0', 'importlib-metadata; python_version < "3.10"', ] diff --git a/tests/units/components/test_slot_code_representer.py b/tests/units/components/test_slot_code_representer.py index 59040be..b31627d 100644 --- a/tests/units/components/test_slot_code_representer.py +++ b/tests/units/components/test_slot_code_representer.py @@ -4,7 +4,7 @@ from denial import InnerNoneType from full_match import match from packaging.version import Version -from printo import descript_data_object +from printo import describe_call from pristan.components.slot_code_representer import SlotCodeRepresenter @@ -622,14 +622,14 @@ def function() -> int: # type: ignore[empty-body] def test_base_module(): def function(): ... - assert SlotCodeRepresenter(descript_data_object).base_module == 'printo' + assert SlotCodeRepresenter(describe_call).base_module == 'printo' assert SlotCodeRepresenter(function).base_module == 'tests' def test_package_version(): def function(): ... - assert SlotCodeRepresenter(descript_data_object).package_version == Version('0.0.26') + assert SlotCodeRepresenter(describe_call).package_version >= Version('0.0.27') assert SlotCodeRepresenter(function).package_version is None