|
12 | 12 |
|
13 | 13 |
|
14 | 14 | @overload |
15 | | -def slot(function: Callable[SlotParameters, List[PluginResult]], /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False) -> SlotProtocol[SlotParameters, List[PluginResult], PluginResult]: ... # pragma: no branch, PLR0913, A002 |
| 15 | +def slot(function: Callable[SlotParameters, List[PluginResult]], /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False, explicit_plugin_names: bool = False) -> SlotProtocol[SlotParameters, List[PluginResult], PluginResult]: ... # pragma: no branch, PLR0913, A002 |
16 | 16 |
|
17 | 17 | @overload |
18 | | -def slot(function: Callable[SlotParameters, Dict[str, PluginResult]], /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False) -> SlotProtocol[SlotParameters, Dict[str, PluginResult], PluginResult]: ... # pragma: no branch, PLR0913, A002 |
| 18 | +def slot(function: Callable[SlotParameters, Dict[str, PluginResult]], /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False, explicit_plugin_names: bool = False) -> SlotProtocol[SlotParameters, Dict[str, PluginResult], PluginResult]: ... # pragma: no branch, PLR0913, A002 |
19 | 19 |
|
20 | 20 | @overload |
21 | | -def slot(function: Callable[SlotParameters, None], /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False) -> SlotProtocol[SlotParameters, None, Any]: ... # pragma: no branch, PLR0913, A002 |
| 21 | +def slot(function: Callable[SlotParameters, None], /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False, explicit_plugin_names: bool = False) -> SlotProtocol[SlotParameters, None, Any]: ... # pragma: no branch, PLR0913, A002 |
22 | 22 |
|
23 | 23 | @overload |
24 | | -def slot(function: str = ..., /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False) -> SlotDecoratorProtocol: ... # pragma: no branch, PLR0913, A002 |
| 24 | +def slot(function: str = ..., /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False, explicit_plugin_names: bool = False) -> SlotDecoratorProtocol: ... # pragma: no branch, PLR0913, A002 |
25 | 25 |
|
26 | | -def slot(function: Optional[object] = None, /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False) -> Any: # noqa: PLR0913, A002 |
| 26 | +def slot(function: Optional[object] = None, /, *, signature: Optional[SlotSignature] = None, name: Optional[str] = None, max: Optional[int] = None, type_check: bool = True, entrypoint_group: str = 'pristan', unique: bool = False, explicit_plugin_names: bool = False) -> Any: # noqa: PLR0913, A002 |
27 | 27 | if callable(function): |
28 | | - return wraps(function)(Slot(function, signature, name, max, type_check, entrypoint_group, unique)) |
| 28 | + return wraps(function)(Slot(function, signature=signature, slot_name=name, max=max, type_check=type_check, entrypoint_group=entrypoint_group, unique=unique, explicit_plugin_names=explicit_plugin_names)) |
29 | 29 |
|
30 | 30 | if isinstance(function, str): |
31 | 31 | if name is not None and name != function: |
32 | 32 | raise ValueError('You have specified two different names for the slot.') |
33 | 33 | name = function |
34 | 34 |
|
35 | | - return partial(slot, signature=signature, name=name, max=max, type_check=type_check, entrypoint_group=entrypoint_group, unique=unique) |
| 35 | + return partial(slot, signature=signature, name=name, max=max, type_check=type_check, entrypoint_group=entrypoint_group, unique=unique, explicit_plugin_names=explicit_plugin_names) |
0 commit comments