Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pristan/components/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pristan/components/slot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pristan/components/slot_code_representer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
]
Expand Down
6 changes: 3 additions & 3 deletions tests/units/components/test_slot_code_representer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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


Expand Down
Loading