Skip to content

feature: support additional user-provided base classes #41

Description

@danielgafni

Is your feature request related to a problem? Please describe.

It seems like currently the extension is looking for direct BaseModel inheritance?
It's clear that it doesn't work with other base classes (that inherit from BaseModel):

Describe the solution you'd like

The set of base classes griffe_pydantic is trying to detect during static analysis should be configurable. For example:

extensions:
  - griffe_pydantic:
       extra_bases:
         - sqlmodel.SQLModel
         - dagster.Config

Describe alternatives you've considered

I've spent an hour trying to accomplish this together with Claude by making a custom extension using dynamic inspection, but couldn't make it work. That's probably a skill issue tho.

Additional context

I'm trying to use griffe_pydantic for my dagster-ray library and many of my objects inherit from dagster.Config which is a pydantic.BaseModel child class.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions