Skip to content

Commit

Permalink
Fix validate typing in metadata methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Pliner committed Sep 25, 2023
1 parent 344abb8 commit 2c2a724
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions marshmallow_recipe/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def is_metadata(value: Any) -> TypeGuard[Metadata]:
def metadata(
*,
name: str = MISSING,
validate: ValidationFunc | None = None,
validate: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
) -> Metadata:
values = dict[str, Any]()
if name is not MISSING:
Expand All @@ -47,7 +47,7 @@ def decimal_metadata(
name: str = MISSING,
places: int = MISSING,
as_string: bool = MISSING,
validate: ValidationFunc | None = None,
validate: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
) -> Metadata:
values = dict[str, Any]()
if name is not MISSING:
Expand All @@ -64,7 +64,7 @@ def decimal_metadata(
def datetime_metadata(
*,
name: str = MISSING,
validate: ValidationFunc | None = None,
validate: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
format: str | None = None,
) -> Metadata:
values = dict[str, Any]()
Expand All @@ -80,8 +80,8 @@ def datetime_metadata(
def list_metadata(
*,
name: str = MISSING,
validate: ValidationFunc | None = None,
validate_item: ValidationFunc | None = None,
validate: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
validate_item: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
) -> Metadata:
values = dict[str, Any]()
if name is not MISSING:
Expand All @@ -96,8 +96,8 @@ def list_metadata(
def set_metadata(
*,
name: str = MISSING,
validate: ValidationFunc | None = None,
validate_item: ValidationFunc | None = None,
validate: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
validate_item: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
) -> Metadata:
values = dict[str, Any]()
if name is not MISSING:
Expand All @@ -112,8 +112,8 @@ def set_metadata(
def tuple_metadata(
*,
name: str = MISSING,
validate: ValidationFunc | None = None,
validate_item: ValidationFunc | None = None,
validate: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
validate_item: ValidationFunc | collections.abc.Sequence[ValidationFunc] | None = None,
) -> Metadata:
values = dict[str, Any]()
if name is not MISSING:
Expand Down

0 comments on commit 2c2a724

Please sign in to comment.