Skip to content

Commit

Permalink
Strict typing fixes so other projects can validate.
Browse files Browse the repository at this point in the history
Release 2.1.1
  • Loading branch information
JustinTArthur committed Aug 10, 2021
1 parent 96da98a commit c56adf9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ddbcereal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ddbcereal.serializing import Serializer
from ddbcereal.types import DateFormat, DynamoDBType, PythonNumber

VERSION = 2, 1, 0
VERSION = 2, 1, 1

ISO_8601 = DateFormat.ISO_8601
UNIX_MILLISECONDS = DateFormat.UNIX_MILLISECONDS
Expand Down
2 changes: 1 addition & 1 deletion ddbcereal/deserializing.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
number_type: PythonNumber = PythonNumber.DECIMAL_ONLY,
null_value: Any = None,
null_factory: Optional[Callable[[], Any]] = None
):
) -> None:
if number_type not in inexact_num_deserializers:
raise ValueError('Unknown python_number technique.')

Expand Down
2 changes: 1 addition & 1 deletion ddbcereal/serializing.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
datetime_format=DateFormat.ISO_8601,
fraction_type=DynamoDBType.NUMBER,
empty_set_type=DynamoDBType.NUMBER_SET
):
) -> None:
decimal_traps = [
decimal.Clamped,
decimal.Overflow,
Expand Down
6 changes: 3 additions & 3 deletions ddbcereal/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

import enum
from typing import Mapping, Sequence, Union
from typing import Mapping, Sequence, Union, Any


class DateFormat(enum.Enum):
Expand Down Expand Up @@ -70,10 +70,10 @@ class PythonNumber(enum.Enum):
DynamoDBSerialValue = Union[
bool,
bytes,
Mapping,
Mapping[str, Any],
Sequence[str],
Sequence[bytes],
Sequence[Mapping],
Sequence[Mapping[str, Any]],
str
]
DynamoDBValue = Mapping[DynamoDBTypeSymbol, DynamoDBSerialValue]
3 changes: 2 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Changelog
=========
Upcoming
2.1.1
--------
* Faster Binary (de)serialization in raw transport mode.
* Fix main constructor strict type checking for referring projects.
* Expose `ddbcereal.FLOAT_ONLY`

2.1.0
Expand Down

0 comments on commit c56adf9

Please sign in to comment.