Skip to content

Commit c2fcc7f

Browse files
committed
Fix typo in server.py
1 parent d0ad13f commit c2fcc7f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

language_tool_python/server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ def _get_valid_spelling_file_path() -> str:
190190

191191
def _register_spellings(self, spellings):
192192
spelling_file_path = self._get_valid_spelling_file_path()
193-
with open(spelling_file_path, "a+", encoding='utf-8') as spellings_file:
193+
with (
194+
open(spelling_file_path, "a+", encoding='utf-8')
195+
) as spellings_file:
194196
spellings_file.write(
195197
"\n" + "\n".join([word for word in spellings])
196198
)
@@ -201,7 +203,7 @@ def _unregister_spellings(self):
201203
spelling_file_path = self._get_valid_spelling_file_path()
202204
with (
203205
open(spelling_file_path, 'r+', encoding='utf-8')
204-
) as spellings_file::
206+
) as spellings_file:
205207
spellings_file.seek(0, os.SEEK_END)
206208
for _ in range(len(self._new_spellings)):
207209
while spellings_file.read(1) != '\n':

0 commit comments

Comments
 (0)