Skip to content

Commit dd3bc5d

Browse files
committed
Bump languagetool version to 6.6.
1 parent ea7494c commit dd3bc5d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

language_tool_python/download_lt.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
BASE_URL = os.environ.get('LTP_DOWNLOAD_HOST', 'https://www.languagetool.org/download/')
2828
FILENAME = 'LanguageTool-{version}.zip'
2929

30-
LTP_DOWNLOAD_VERSION = '6.5'
30+
LTP_DOWNLOAD_VERSION = '6.6'
3131

3232
JAVA_VERSION_REGEX = re.compile(
3333
r'^(?:java|openjdk) version "(?P<major1>\d+)(|\.(?P<major2>\d+)\.[^"]+)"',
@@ -74,7 +74,7 @@ def confirm_java_compatibility() -> bool:
7474
:return: True if the Java version is compatible.
7575
:rtype: bool
7676
"""
77-
77+
7878
java_path = which('java')
7979
if not java_path:
8080
raise ModuleNotFoundError(
@@ -109,7 +109,7 @@ def get_common_prefix(z: zipfile.ZipFile) -> Optional[str]:
109109
:return: The common prefix of all file names in the zip archive, or None if there is no common prefix.
110110
:rtype: Optional[str]
111111
"""
112-
112+
113113
name_list = z.namelist()
114114
if name_list and all(n.startswith(name_list[0]) for n in name_list[1:]):
115115
return name_list[0]
@@ -152,7 +152,7 @@ def unzip_file(temp_file: str, directory_to_extract_to: str) -> None:
152152
:param directory_to_extract_to: The directory where the contents of the zip file will be extracted.
153153
:type directory_to_extract_to: str
154154
"""
155-
155+
156156
logger.info(f'Unzipping {temp_file.name} to {directory_to_extract_to}.')
157157
with zipfile.ZipFile(temp_file.name, 'r') as zip_ref:
158158
zip_ref.extractall(directory_to_extract_to)
@@ -184,11 +184,11 @@ def download_lt(language_tool_version: Optional[str] = LTP_DOWNLOAD_VERSION) ->
184184
"""
185185
Downloads and extracts the specified version of LanguageTool.
186186
This function checks for Java compatibility, creates the necessary download
187-
directory if it does not exist, and downloads the specified version of
187+
directory if it does not exist, and downloads the specified version of
188188
LanguageTool if it is not already present.
189-
190-
:param language_tool_version: The version of LanguageTool to download. If not
191-
specified, the default version defined by
189+
190+
:param language_tool_version: The version of LanguageTool to download. If not
191+
specified, the default version defined by
192192
LTP_DOWNLOAD_VERSION is used.
193193
:type language_tool_version: Optional[str]
194194
:raises AssertionError: If the download folder is not a directory.

0 commit comments

Comments
 (0)