File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 2828BASE_URL = os .environ .get ('LTP_DOWNLOAD_HOST' , 'https://www.languagetool.org/download/' )
2929FILENAME = 'LanguageTool-{version}.zip'
3030
31- LATEST_VERSION = '5.7 '
31+ LATEST_VERSION = '6.0 '
3232
3333JAVA_VERSION_REGEX = re .compile (
3434 r'^(?:java|openjdk) version "(?P<major1>\d+)(|\.(?P<major2>\d+)\.[^"]+)"' ,
@@ -69,9 +69,6 @@ def confirm_java_compatibility():
6969 """ Confirms Java major version >= 8. """
7070 java_path = find_executable ('java' )
7171 if not java_path :
72- # Just ignore this and assume an old version of Java. It might not be
73- # found because of a PATHEXT-related issue
74- # (https://bugs.python.org/issue2200).
7572 raise ModuleNotFoundError ('No java install detected. Please install java to use language-tool-python.' )
7673
7774 output = subprocess .check_output ([java_path , '-version' ],
@@ -145,7 +142,7 @@ def download_lt():
145142 version = LATEST_VERSION
146143 filename = FILENAME .format (version = version )
147144 language_tool_download_url = urljoin (BASE_URL , filename )
148- dirname = os .path .splitext (filename )[ 0 ]
145+ dirname , _ = os .path .splitext (filename )
149146 extract_path = os .path .join (download_folder , dirname )
150147
151148 if extract_path in old_path_list :
You can’t perform that action at this time.
0 commit comments