Skip to content

Commit

Permalink
🏷️ version 0.7.4
Browse files Browse the repository at this point in the history
update core.pyi
  • Loading branch information
RF-Tar-Railt committed May 19, 2024
1 parent a5d228e commit a3cebe8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion nepattern/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def __init__(
if self.mode == MatchMode.TYPE_CONVERT:
if not converter and (not origin or origin is Any):
raise ValueError(origin)
self.converter = converter or (lambda _, x: (get_origin(self.origin) or self.origin)(x))
self.converter = converter or (lambda _, x: (get_origin(self.origin) or self.origin)(x)) # type: ignore
elif self.mode == MatchMode.VALUE_OPERATE:
if not converter:
raise ValueError(converter)
Expand Down
21 changes: 3 additions & 18 deletions nepattern/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -756,20 +756,20 @@ class BasePattern(Generic[TOrigin, TInput, TMM]):
[BasePattern[TOrigin1, TOrigin1, Literal[MatchMode.VALUE_OPERATE]], TOrigin1], TOrigin1 | None
],
alias: str | None = None,
previous: None = None,
previous: BasePattern[TOrigin1, TOrigin1, Literal[MatchMode.VALUE_OPERATE]] | None = None,
accepts: None = None,
addition_accepts: None = None,
validators: list[Callable[[TOrigin1], bool]] | None = None,
): ...
@overload
def __init__(
self: BasePattern[TOrigin1, TOrigin1 | TInput1, Literal[MatchMode.VALUE_OPERATE]],
self: BasePattern[TOrigin1, TInput1, Literal[MatchMode.VALUE_OPERATE]],
*,
mode: Literal[MatchMode.VALUE_OPERATE],
origin: type[TOrigin1],
previous: BasePattern[TOrigin1, TInput1, Literal[MatchMode.TYPE_CONVERT]],
converter: Callable[
[BasePattern[TOrigin1, TOrigin1 | TInput1, Literal[MatchMode.VALUE_OPERATE]], TOrigin1],
[BasePattern[TOrigin1, TInput1, Literal[MatchMode.VALUE_OPERATE]], TOrigin1],
TOrigin1 | None,
],
alias: str | None = None,
Expand All @@ -793,21 +793,6 @@ class BasePattern(Generic[TOrigin, TInput, TMM]):
addition_accepts: None = None,
validators: list[Callable[[TOrigin1], bool]] | None = None,
): ...
@overload
def __init__(
self: BasePattern[TOrigin1, TOrigin1, Literal[MatchMode.VALUE_OPERATE]],
*,
mode: Literal[MatchMode.VALUE_OPERATE],
origin: type[TOrigin1],
previous: BasePattern[TOrigin1, TOrigin1, Literal[MatchMode.VALUE_OPERATE]],
converter: Callable[
[BasePattern[TOrigin1, TOrigin1, Literal[MatchMode.VALUE_OPERATE]], TOrigin1], TOrigin1 | None
],
alias: str | None = None,
accepts: None = None,
addition_accepts: None = None,
validators: list[Callable[[TOrigin1], bool]] | None = None,
): ...
def refresh(self): ...
def __calc_hash__(self): ...
def __calc_repr__(self): ...
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nepattern"
version = "0.7.3"
version = "0.7.4"
description = "a complex pattern, support typing"
authors = [
{name = "RF-Tar-Railt", email = "[email protected]"},
Expand Down

0 comments on commit a3cebe8

Please sign in to comment.