Skip to content

feature: Fall back to dynamic analysis when static fails #15

@nardi

Description

@nardi

We have some Pydantic models that have dynamically generated field attributes, such as description and default. Currently, the static analyzer crashes on this (when attempting ast.literal_eval), but looking at the code it looks like the dynamic analyzer should be able to handle this. However, I don't see any way to trigger it.

Ideally, when something like this is encountered, the static analyzer would mark the class/attribute in question and additionally perform dynamic analysis on it. If that is not possible/desirable, having a way to manually force dynamic analysis (also when using MkDocs), possibly for specific classes, would be useful as well.

I could work on a PR but first wanted to check if a feature like this was maybe already planned, or if it is purposefully not going to be implemented.

Metadata

Metadata

Assignees

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