You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
inspect has getsourcelines. If it fails, it fails. What I mean is, if we're not able to get line numbers, we won't be able to get source lines. So no need to change the source property, we just have to do our best to get line numbers.
Following #271, and now that Griffe can inspect everything even when sources are found, maybe we should rework how
lines
and thereforesource
are computed. If possible, when inspecting and sources are available (and added to the lines collection), we should try to obtain thelineno
andendlineno
values frominspect
(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 withinspect
(stdlib) to set thesource
attribute of the object. To allow settingsource
, we should keep the actual source in a_source
attribute, and the property would first check that.The text was updated successfully, but these errors were encountered: