File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 99import requests
1010import subprocess
1111import sys
12- import os
1312import tempfile
1413import tqdm
15- import zipfile
14+ import zipfile
1615
1716from distutils .spawn import find_executable
1817from urllib .parse import urljoin
2827BASE_URL = os .environ .get ('LTP_DOWNLOAD_HOST' , 'https://www.languagetool.org/download/' )
2928FILENAME = 'LanguageTool-{version}.zip'
3029
31- LATEST_VERSION = '6.0 '
30+ LATEST_VERSION = '6.2 '
3231
3332JAVA_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.
You can’t perform that action at this time.
0 commit comments