Skip to content

Commit

Permalink
use f strings
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyarabskyy committed Jun 25, 2019
1 parent 70b6bfb commit eee49f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonosco/models/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __create_serialize_body(cls, fields_to_serialize):
elif is_dataclass(field.type):
body_lines.append(__create_dict_entry(field.name, f"self.{field.name}.__serialize__()"))
elif __is_nn_class(field.type):
body_lines.append("'{}': {".format(field.name))
body_lines.append(f"'{field.name}': {{")
__extract_from_nn(cls, body_lines)
body_lines.append("}")
else:
Expand All @@ -75,7 +75,7 @@ def __throw_unsupported_data_type():


def __create_dict_entry(key, value):
return f'\'{key}\': {value},'
return f"'{key}': {value},"


def __is_primitive(obj):
Expand Down

0 comments on commit eee49f6

Please sign in to comment.