Skip to content

from_dict() does not cast floating point types #96

Open
@priesgo

Description

@priesgo

When you pass in the dictionary a float to an int field, this is casted to int (line 890 betterproto/__init__.py). I would expect a similar behaviour in the reverse situation when you pass an int to a float field. Right now you end up with an object having an int in a field which should contain a float.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerslow prioritysmallLow effort issue that can easily be picked up

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions