|
31 | 31 | BASE_URL = os.environ.get('LTP_DOWNLOAD_HOST', 'https://www.languagetool.org/download/') |
32 | 32 | FILENAME = 'LanguageTool-{version}.zip' |
33 | 33 |
|
34 | | -LT_DOWNLOAD_VERSION = '6.2' |
| 34 | +LTP_DOWNLOAD_VERSION = '6.2' |
35 | 35 |
|
36 | 36 | JAVA_VERSION_REGEX = re.compile( |
37 | 37 | r'^(?:java|openjdk) version "(?P<major1>\d+)(|\.(?P<major2>\d+)\.[^"]+)"', |
@@ -116,7 +116,7 @@ def http_get(url, out_file, proxies=None): |
116 | 116 | if req.status_code == 403: # Not found on AWS |
117 | 117 | raise Exception('Could not find at URL {}.'.format(url)) |
118 | 118 | progress = tqdm.tqdm(unit="B", unit_scale=True, total=total, |
119 | | - desc=f'Downloading LanguageTool {LT_DOWNLOAD_VERSION}') |
| 119 | + desc=f'Downloading LanguageTool {LTP_DOWNLOAD_VERSION}') |
120 | 120 | for chunk in req.iter_content(chunk_size=1024): |
121 | 121 | if chunk: # filter out keep-alive new chunks |
122 | 122 | progress.update(len(chunk)) |
@@ -148,7 +148,7 @@ def download_zip(url, directory): |
148 | 148 | logger.info('Downloaded {} to {}.'.format(url, directory)) |
149 | 149 |
|
150 | 150 |
|
151 | | -def download_lt(language_tool_version: Optional[str] = LT_DOWNLOAD_VERSION): |
| 151 | +def download_lt(language_tool_version: Optional[str] = LTP_DOWNLOAD_VERSION): |
152 | 152 | confirm_java_compatibility() |
153 | 153 |
|
154 | 154 | download_folder = get_language_tool_download_path() |
|
0 commit comments