| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,8 @@ | |||
| 1 | - from _typeshed import Incomplete, SupportsRead, SupportsWrite | ||
| 1 | + from _typeshed import SupportsRead, SupportsWrite | ||
| 2 | 2 | from collections.abc import Callable | |
| 3 | - from typing import Any | ||
| 3 | + from typing import Any, Final | ||
| 4 | 4 | ||
| 5 | - __version__: str | ||
| 5 | + __version__: Final[str] | ||
| 6 | 6 | ||
| 7 | 7 | def encode( | |
| 8 | 8 | obj: Any, | |
@@ -14,7 +14,7 @@ def encode( | |||
| 14 | 14 | indent: int = ..., | |
| 15 | 15 | allow_nan: bool = ..., | |
| 16 | 16 | reject_bytes: bool = ..., | |
| 17 | - default: Callable[[Incomplete], Incomplete] | None = None, | ||
| 17 | + default: Callable[[Any], Any] | None = None, # Specify how to serialize arbitrary types | ||
| 18 | 18 | separators: tuple[str, str] | None = None, | |
| 19 | 19 | ) -> str: ... | |
| 20 | 20 | def dumps( | |
@@ -27,7 +27,7 @@ def dumps( | |||
| 27 | 27 | indent: int = ..., | |
| 28 | 28 | allow_nan: bool = ..., | |
| 29 | 29 | reject_bytes: bool = ..., | |
| 30 | - default: Callable[[Incomplete], Incomplete] | None = None, | ||
| 30 | + default: Callable[[Any], Any] | None = None, # Specify how to serialize arbitrary types | ||
| 31 | 31 | separators: tuple[str, str] | None = None, | |
| 32 | 32 | ) -> str: ... | |
| 33 | 33 | def dump( | |
@@ -42,7 +42,7 @@ def dump( | |||
| 42 | 42 | indent: int = ..., | |
| 43 | 43 | allow_nan: bool = ..., | |
| 44 | 44 | reject_bytes: bool = ..., | |
| 45 | - default: Callable[[Incomplete], Incomplete] | None = None, | ||
| 45 | + default: Callable[[Any], Any] | None = None, # Specify how to serialize arbitrary types | ||
| 46 | 46 | separators: tuple[str, str] | None = None, | |
| 47 | 47 | ) -> None: ... | |
| 48 | 48 | def decode(s: str | bytes | bytearray, precise_float: bool = ...) -> Any: ... | |
| Back | FazBrowse Home | New Git URL |
0 commit comments