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
I'm not sure if this is possible without analyzing source code. Since there is nothing actually happening on the def line, it is omitted in the bytecode. You also cannot use a previous or next line in the bytecode and then just add/subtract a line since comments can exist between decorators, def line, and function body which are also omitted in the bytecode
Comments between decorators should be very rare. For the normal cases, potentially we can imitate what the undecorated lib is doing and count the number of decorators, then add the number of lines:
Now
frame.defined_lineno
is the line of the first decorator. Ideally it should be the line wheredef
is at.The text was updated successfully, but these errors were encountered: