We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6b9d24 commit 7b28e31Copy full SHA for 7b28e31
bson/decimal128.py
@@ -70,10 +70,10 @@ class DecimalEncoder(TypeEncoder):
70
.. versionadded:: 4.15"""
71
72
@property
73
- def python_type(self):
+ def python_type(self) -> Type[Decimal]:
74
return Decimal
75
76
- def transform_python(self, value):
+ def transform_python(self, value: Any) -> Decimal128:
77
return Decimal128(value)
78
79
@@ -86,10 +86,10 @@ class DecimalDecoder(TypeDecoder):
86
87
88
89
- def bson_type(self):
+ def bson_type(self) -> Type[Decimal128]:
90
return Decimal128
91
92
- def transform_bson(self, value):
+ def transform_bson(self, value: Any) -> decimal.Decimal:
93
return value.to_decimal()
94
95
0 commit comments