Skip to content

Commit

Permalink
Fix typo in server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pidefrem committed Apr 11, 2024
1 parent d0ad13f commit c2fcc7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions language_tool_python/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ def _get_valid_spelling_file_path() -> str:

def _register_spellings(self, spellings):
spelling_file_path = self._get_valid_spelling_file_path()
with open(spelling_file_path, "a+", encoding='utf-8') as spellings_file:
with (
open(spelling_file_path, "a+", encoding='utf-8')
) as spellings_file:
spellings_file.write(
"\n" + "\n".join([word for word in spellings])
)
Expand All @@ -201,7 +203,7 @@ def _unregister_spellings(self):
spelling_file_path = self._get_valid_spelling_file_path()
with (
open(spelling_file_path, 'r+', encoding='utf-8')
) as spellings_file::
) as spellings_file:
spellings_file.seek(0, os.SEEK_END)
for _ in range(len(self._new_spellings)):
while spellings_file.read(1) != '\n':
Expand Down

0 comments on commit c2fcc7f

Please sign in to comment.