-
Notifications
You must be signed in to change notification settings - Fork 13
[BUG] Pydantic no longer allows FieldInfo subclassing #63
Copy link
Copy link
Open
Description
Describe the bug
As of Pydantic 2.12, FieldInfo is marked @final and is not allowed to be subclassed, which upsets mypy on Shinobi.
ninja/params/models.py:263:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:267:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:271:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:275:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:279:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:283:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:287:1: error: Cannot inherit from final class "FieldInfo" [misc]
ninja/params/models.py:291:1: error: Cannot inherit from final class "FieldInfo" [misc]
As far as I can tell though, I don't think we really need these types to subclass FieldInfo. They're just used to ship info between the API type declaration and its actual representation as ViewSignature.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels