Skip to content

Commit 2b9ff61

Browse files
committed
fix: More typos
1 parent 179018c commit 2b9ff61

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ class Point(Base, SerializerMixin):
416416
position = Column(Geometry('POINT'))
417417
```
418418

419-
Unfortunately you can not access formats or tzinfo in that functions.
419+
Unfortunately you cannot access formats or tzinfo in that functions.
420420
I'll implement this logic later if any of users needs it.
421421

422422

@@ -517,7 +517,7 @@ But `serialize_only = ('model', '-model.id',)` will return `model` field without
517517
Do not forget to add **comma** at the end of one element tuples, it is trivial,
518518
but a lot of developers forget about it:
519519
```python
520-
serialize_only = ('some_field',) # <--- Thats right!
520+
serialize_only = ('some_field',) # <--- That's right!
521521
serialize_only = ('some_field') # <--- WRONG it is actually not a tuple
522522

523523
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class Base:
22
def __call__(self, value) -> str:
3-
raise NotImplementedError(f"Method should implement serialization logic for{value}")
3+
raise NotImplementedError(f"Method should implement serialization logic for {value}")

sqlalchemy_serializer/serializer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def to_dict(
123123
),
124124
serialize_columns=serialize_columns or self.serialize_columns,
125125
)
126-
return s(self, only=only, extend=rules)
126+
return s(self, only=only, extend=rules) # type: ignore
127127

128128

129129
Options = namedtuple(
@@ -133,7 +133,7 @@ def to_dict(
133133

134134

135135
class Serializer:
136-
# Types that do nod need any serialization logic
136+
# Types that do not need any serialization logic
137137
atomic_types = (
138138
int,
139139
str,
@@ -285,7 +285,7 @@ def serialize(self, value, key=_UNSPECIFIED):
285285
return self.apply_callback(value=value)
286286

287287
except IsNotSerializable:
288-
logger.warning("Can not serialize type:%s", get_type(value))
288+
logger.warning("Cannot serialize type:%s", get_type(value))
289289

290290
logger.debug("Skip value:%s", value)
291291
return _UNSPECIFIED

tests/test_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ def check_rule(text: str, tree: Tree) -> Tree:
240240
"""
241241
rule = Rule(text)
242242
for k in rule.keys:
243-
tree = tree.get(k)
243+
tree = tree.get(k) # type: ignore
244244
if tree is None:
245-
raise NoNodeException(f"Can not find key:{k} in tree:{tree}")
245+
raise NoNodeException(f"Cannot find key:{k} in tree:{tree}")
246246
if rule.is_negative:
247247
assert tree.to_exclude
248248
else:

0 commit comments

Comments
 (0)