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
def my_func(x):
a = 0
return x # Code after this is dead code!
return x
Then your tool (i.e. by calling fix_code) does not remove the second return x, but produces
def my_func(x):
return x # Code after this is dead code!
return x
In general, all the code after the last return statement that we know will be executed is not executed, so it's dead code that can be removed. So, why doesn't your tool handle these cases?
The text was updated successfully, but these errors were encountered:
Let's say we have this function
Then your tool (i.e. by calling
fix_code
) does not remove the secondreturn x
, but producesIn general, all the code after the last return statement that we know will be executed is not executed, so it's dead code that can be removed. So, why doesn't your tool handle these cases?
The text was updated successfully, but these errors were encountered: