Skip to content

refactor: Maybe rework the logic for objects lines or source #272

@pawamoy

Description

@pawamoy

Following #271, and now that Griffe can inspect everything even when sources are found, maybe we should rework how lines and therefore source are computed. If possible, when inspecting and sources are available (and added to the lines collection), we should try to obtain the lineno and endlineno values from inspect (stdlib). If the sources are not available (no filepath, and/or no entry in the lines collection), we should still try to obtain the source with inspect (stdlib) to set the source attribute of the object. To allow setting source, we should keep the actual source in a _source attribute, and the property would first check that.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions