Skip to content

Commit c56adf9

Browse files
committed
Strict typing fixes so other projects can validate.
Release 2.1.1
1 parent 96da98a commit c56adf9

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

ddbcereal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from ddbcereal.serializing import Serializer
1818
from ddbcereal.types import DateFormat, DynamoDBType, PythonNumber
1919

20-
VERSION = 2, 1, 0
20+
VERSION = 2, 1, 1
2121

2222
ISO_8601 = DateFormat.ISO_8601
2323
UNIX_MILLISECONDS = DateFormat.UNIX_MILLISECONDS

ddbcereal/deserializing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(
3232
number_type: PythonNumber = PythonNumber.DECIMAL_ONLY,
3333
null_value: Any = None,
3434
null_factory: Optional[Callable[[], Any]] = None
35-
):
35+
) -> None:
3636
if number_type not in inexact_num_deserializers:
3737
raise ValueError('Unknown python_number technique.')
3838

ddbcereal/serializing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
datetime_format=DateFormat.ISO_8601,
4545
fraction_type=DynamoDBType.NUMBER,
4646
empty_set_type=DynamoDBType.NUMBER_SET
47-
):
47+
) -> None:
4848
decimal_traps = [
4949
decimal.Clamped,
5050
decimal.Overflow,

ddbcereal/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
import enum
16-
from typing import Mapping, Sequence, Union
16+
from typing import Mapping, Sequence, Union, Any
1717

1818

1919
class DateFormat(enum.Enum):
@@ -70,10 +70,10 @@ class PythonNumber(enum.Enum):
7070
DynamoDBSerialValue = Union[
7171
bool,
7272
bytes,
73-
Mapping,
73+
Mapping[str, Any],
7474
Sequence[str],
7575
Sequence[bytes],
76-
Sequence[Mapping],
76+
Sequence[Mapping[str, Any]],
7777
str
7878
]
7979
DynamoDBValue = Mapping[DynamoDBTypeSymbol, DynamoDBSerialValue]

docs/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Changelog
22
=========
3-
Upcoming
3+
2.1.1
44
--------
55
* Faster Binary (de)serialization in raw transport mode.
6+
* Fix main constructor strict type checking for referring projects.
67
* Expose `ddbcereal.FLOAT_ONLY`
78

89
2.1.0

0 commit comments

Comments
 (0)