danielgtaylor / danielgtaylor/python-betterproto

from_dict() does not cast floating point types

Offen
#96 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug good first issue low priority small
Vorherrschende Sprache
Python
Sterne
1.8k
Forks
234
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.