Skip to content

Commit 006ad6f

Browse files
authored
Merge pull request jxmorris12#85 from bobbens/languagetool6.2
Use latest version of languagetool (6.2)
2 parents 534af31 + a4646c8 commit 006ad6f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

language_tool_python/download_lt.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
import requests
1010
import subprocess
1111
import sys
12-
import os
1312
import tempfile
1413
import tqdm
15-
import zipfile
14+
import zipfile
1615

1716
from distutils.spawn import find_executable
1817
from urllib.parse import urljoin
@@ -28,7 +27,7 @@
2827
BASE_URL = os.environ.get('LTP_DOWNLOAD_HOST', 'https://www.languagetool.org/download/')
2928
FILENAME = 'LanguageTool-{version}.zip'
3029

31-
LATEST_VERSION = '6.0'
30+
LATEST_VERSION = '6.2'
3231

3332
JAVA_VERSION_REGEX = re.compile(
3433
r'^(?:java|openjdk) version "(?P<major1>\d+)(|\.(?P<major2>\d+)\.[^"]+)"',
@@ -57,7 +56,7 @@ def parse_java_version(version_text):
5756
(1, 8)
5857
5958
"""
60-
match = re.search(JAVA_VERSION_REGEX, version_text) or re.search(JAVA_VERSION_REGEX_UPDATED, version_text)
59+
match = re.search(JAVA_VERSION_REGEX, version_text) or re.search(JAVA_VERSION_REGEX_UPDATED, version_text)
6160
if not match:
6261
raise SystemExit(
6362
'Could not parse Java version from """{}""".'.format(version_text))
@@ -121,7 +120,7 @@ def download_zip(url, directory):
121120
downloaded_file = tempfile.NamedTemporaryFile(suffix='.zip', delete=False)
122121
http_get(url, downloaded_file)
123122
# Close the file so we can extract it.
124-
downloaded_file.close()
123+
downloaded_file.close()
125124
# Extract zip file to path.
126125
unzip_file(downloaded_file, directory)
127126
# Remove the temporary file.

0 commit comments

Comments
 (0)