File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,12 @@ def lsp_text_document_edits(self) -> Iterator[TextDocumentEdit]:
76
76
for path , changed_file in changed_files .items ():
77
77
uri = path .as_uri ()
78
78
document = self .workspace .get_text_document (uri )
79
- notebook = notebook_utils .notebook_coordinate_mapper (
79
+ notebook_mapper = notebook_utils .notebook_coordinate_mapper (
80
80
self .workspace , notebook_uri = uri
81
81
)
82
- source = notebook .source if notebook else document .source
82
+ source = (
83
+ notebook_mapper .source if notebook_mapper else document .source
84
+ )
83
85
version = 0 if document .version is None else document .version
84
86
text_edits = lsp_text_edits (source , changed_file )
85
87
if text_edits :
@@ -90,8 +92,8 @@ def lsp_text_document_edits(self) -> Iterator[TextDocumentEdit]:
90
92
),
91
93
edits = text_edits ,
92
94
)
93
- if notebook is not None :
94
- yield from notebook .cell_text_document_edits (
95
+ if notebook_mapper is not None :
96
+ yield from notebook_mapper .cell_text_document_edits (
95
97
text_document_edit
96
98
)
97
99
else :
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ def test_lsp_rename_function_notebook():
163
163
},
164
164
],
165
165
}
166
- assert actual == expected
166
+ assert_that ( actual , is_ ( expected ))
167
167
168
168
169
169
def test_lsp_rename_variable_at_line_start ():
@@ -398,7 +398,7 @@ def test_rename_package_notebook() -> None:
398
398
},
399
399
]
400
400
}
401
- assert actual == expected
401
+ assert_that ( actual , is_ ( expected ))
402
402
403
403
404
404
def test_rename_module () -> None :
You can’t perform that action at this time.
0 commit comments