Skip to content

Commit a4a9ffa

Browse files
committed
Fix BBAN getnewargs typing
1 parent b8cd413 commit a4a9ffa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

schwifty/bban.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def __new__(cls: type[Self], country_code: str, value: str, **kwargs: Any) -> Se
9090
def __init__(self, country_code: str, value: str) -> None:
9191
self.country_code = country_code
9292

93-
def __getnewargs__(self) -> tuple[str, str]:
93+
# BBAN.__new__ needs both values when pickle reconstructs the object.
94+
def __getnewargs__(self) -> tuple[str, str]: # type: ignore[override]
9495
return (self.country_code, self.compact)
9596

9697
def __deepcopy__(self, memo: dict[str, Any] | None = None) -> Self:

0 commit comments

Comments
 (0)