Skip to content

Force inspection #94

Closed
Closed
@mdelmans

Description

@mdelmans

Is your feature request related to a problem? Please describe.
I have some dynamically-generated classes that need to be inspected rather than visited and I can't find an option to force inspection.

Describe the solution you'd like
Would be nice to have a force_inspection option.

Describe alternatives you've considered
I tried importing classes manually inside extension but extensions do not provide access to griffe inspector to fetch dynamic class attributes.

Additional context
I'm dealing with for Pydantic BaseModel classes and I managed to inject field info through an extension and override the template to render things the way I want. Some of my models are dynamically-generated and their attributes are not picked up.

Inside my extension, I import the class, inspect its fields and add an extra key to each attribute containing field info. But for the dynamically-generated models I have no attributes to inject field info to.

Hope it makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions