Skip to content

@autofields does not take definition order into account #76

@smarie

Description

@smarie

Consider this:

from pyfields import autofields, get_fields

@autofields
class Foo:
    c: int
    b: str = "hello"

get_fields(Foo)  # <-- (<NativeField: Foo.b>, <NativeField: Foo.c>)

So the order in which the fields are returned is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions