Skip to content

chore: update dependencies #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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