SylvainDe / DidYouMean-Python

Module to have suggestions in case of errors (NameError, AttributeError, etc).
MIT License
122 stars 15 forks source link

About TODO_ENCLOSING #54

Open aroberge opened 4 years ago

aroberge commented 4 years ago

Hi,

I'm slowly implementing some of your ideas for my own project (friendly-traceback). I noticed that you had a comment about labelled TODO_ENCLOSING which I understood to mean nonlocal scopes.

I have implemented something that does that in my own project: get_variables_in_frame_by_scope in info_variables.py currently found at https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/info_variables.py#L16

Perhaps this could be of some use to you in relation to that comment.

I do recognize that my code is not as tight/efficient as yours, as I am trying to graft something like DidYouMean-Python into a project that was not designed for it initially.

SylvainDe commented 4 years ago

Hello, Thanks for your suggestion! It does seem like the kind of things I should have implemented! It would definitely help me implement that missing feature.