Skip to content

Commit

Permalink
add type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Oct 13, 2024
1 parent d3bcded commit 430a87e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion znfields/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def __getattribute__(self, name: str) -> Any:


@functools.wraps(dataclasses.field)
def field(*, getter: Optional[Callable[[Any, str], Any]] = None, **kwargs):
def field(
*, getter: Optional[Callable[[Any, str], Any]] = None, **kwargs
) -> dataclasses.Field:
if getter is not None:
if "metadata" in kwargs:
if not isinstance(kwargs["metadata"], dict):
Expand Down

0 comments on commit 430a87e

Please sign in to comment.