Skip to content

Commit

Permalink
Fix flake8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
lyang committed Feb 7, 2025
1 parent 26a0006 commit 2971a23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pynamodb_encoder/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def coerce(self, element_type: Union[Type[Attribute], None]) -> Attribute:
return (element_type or Attribute)()

def decode_map(self, attr: MapAttribute, data: Dict[str, Any]):
if type(attr) == MapAttribute:
if type(attr) is MapAttribute:
return data
elif isinstance(attr, DynamicMapAttribute):
return self.decode_dynamic_map(attr, data)
Expand Down
2 changes: 1 addition & 1 deletion pynamodb_encoder/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def encode_list(self, attr: ListAttribute, data: List) -> List:
return [self.encode_attribute(element_attr, value) for value in data]

def encode_map(self, attr: MapAttribute, data: MapAttribute) -> Dict:
if type(attr) == MapAttribute:
if type(attr) is MapAttribute:
return {name: data[name] for name in data}
elif isinstance(attr, DynamicMapAttribute):
return self.encode_dynamic_map(attr, data)
Expand Down

0 comments on commit 2971a23

Please sign in to comment.