Fix inline case where a name was removed without the code being used, fixes #1582
This commit is contained in:
1 parent
381fbeda6a
commit
d4aa583e16
2 files changed
+7
No files matched your search
@@ -173,6 +173,8 @@ def inline(inference_state, names):
|
||||
raise RefactoringError("No definition found to inline")
|
||||
if len(definitions) > 1:
|
||||
raise RefactoringError("Cannot inline a name with multiple definitions")
|
||||
if len(names) == 1:
|
||||
raise RefactoringError("There are no references to this name")
|
||||
|
||||
tree_name = definitions[0].tree_name
|
||||
|
||||
|
||||
Reference in new issue
Block a user