Skip to content

Commit

Permalink
chore: update dependencies (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
glevco authored Oct 28, 2023
1 parent 89d347e commit ab1a6ca
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 119 deletions.
2 changes: 1 addition & 1 deletion hathor/event/model/base_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def data_type_must_match_event_type(cls, v, values):
event_type = EventType(values['type'])
expected_data_type = event_type.data_type()

if type(v) != expected_data_type:
if type(v) is not expected_data_type:
raise ValueError('event data type does not match event type')

return v
2 changes: 1 addition & 1 deletion hathor/p2p/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_settings_hello_dict() -> dict[str, Any]:
for key in settings.P2P_SETTINGS_HASH_FIELDS:
value = getattr(settings, key)
# We are going to json.dumps this dict, so we can't have bytes here
if type(value) == bytes:
if type(value) is bytes:
value = value.hex()
settings_dict[key] = value
return settings_dict
Expand Down
4 changes: 2 additions & 2 deletions hathor/utils/named_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def validated_named_tuple_from_dict(

# This intermediate step shouldn't be necessary, but for some reason pydantic.create_model_from_namedtuple
# doesn't support default attribute values, so we do this to add them
all_attributes = named_tuple_type(**attributes_dict)
all_attributes = named_tuple_type(**attributes_dict) # type: ignore[call-overload]
validated_attributes = model(**all_attributes._asdict())
validated_attributes_dict = {k: v for k, v in validated_attributes}

return named_tuple_type(**validated_attributes_dict)
return named_tuple_type(**validated_attributes_dict) # type: ignore[call-overload]
Loading

0 comments on commit ab1a6ca

Please sign in to comment.