Skip to content
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

Improve Union type support #87

Merged
merged 16 commits into from
Mar 4, 2021
Merged

Improve Union type support #87

merged 16 commits into from
Mar 4, 2021

Commits on Feb 13, 2021

  1. Configuration menu
    Copy the full SHA
    5fdb76a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    434edf6 View commit details
    Browse the repository at this point in the history
  3. fix: test_union_optional

    ydylla committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    e86b345 View commit details
    Browse the repository at this point in the history
  4. wip: use own is_instance for se

    * passing union args per serde scope to rendered union function
    * spliting is_instance into multiple functions & rendering the correct one will be faster
    ydylla committed Feb 13, 2021
    Configuration menu
    Copy the full SHA
    af84ab3 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2021

  1. Configuration menu
    Copy the full SHA
    e48c770 View commit details
    Browse the repository at this point in the history
  2. chore: replace typecheck with is_instance

    * is_instance takes some shortcuts to increase performance, like only checking the 1st element of lists
    * typecheck was only used in tests
    ydylla committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    a86d9b4 View commit details
    Browse the repository at this point in the history
  3. test: fix deserializing test by reordering types in union

    To be more performant we just try to deserialize instead of checking types, this means the order of types in unions is important. More complex types should be tried first, otherwise simple types will prematurely  match.
    ydylla committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    36c7095 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a3c384 View commit details
    Browse the repository at this point in the history
  5. chore: fix set support

    ydylla committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    1210fe1 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2021

  1. refactor: use __serde__ as scope for everything

    * use a typed dataclass as container for serde internals
    * removed more_types.py & the custom serializer code. Unkown type exception has now own function.
    ydylla committed Feb 25, 2021
    7 Configuration menu
    Copy the full SHA
    431c914 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2021

  1. fix: scope should not be shared between classes

    class inheritance caused overwriting of scope values
    ydylla committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    889ada1 View commit details
    Browse the repository at this point in the history
  2. style: format code

    ydylla committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    8deaa3a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e8d2e5 View commit details
    Browse the repository at this point in the history
  4. fix: use iter_unions to recursively collect all unions of dataclass

    thanks tomlfile example, otherwise I had not noticed it
    ydylla committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    577aeb9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3a973f9 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2021

  1. Configuration menu
    Copy the full SHA
    e02e1ee View commit details
    Browse the repository at this point in the history