You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In order to improve flexibility and composability over inheritance it would be beneficial to improve the design using static duck typing PEP 544
Describe the solution you'd like
This is a very basic example how we can use it to adopt standard dataclasses as replacement of pydantic data models but at the same type leave the flexibility to use them for data validation in a fancy way without touching the core:
francbartoli
changed the title
WIP: Use Protocol classes for Tile Provider implementations
WIP: Use Protocol classes for Tile Provider interfaces
Feb 23, 2024
francbartoli
changed the title
WIP: Use Protocol classes for Tile Provider interfaces
Use Protocol interfaces and static duck typing design pattern
Feb 29, 2024
I would be interested to see the move to plain dataclasses as well. Since they are part of python this should be more stable than using pydantic. Currently I'm facing the same problem as described here #1664
Is there a roadmap when this could happen? I could support working on that.
Is your feature request related to a problem? Please describe.
In order to improve flexibility and composability over inheritance it would be beneficial to improve the design using static duck typing PEP 544
Describe the solution you'd like
This is a very basic example how we can use it to adopt standard dataclasses as replacement of pydantic data models but at the same type leave the flexibility to use them for data validation in a fancy way without touching the core:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: