mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
parent
99fa9ba5ef
commit
f415f6c4d7
10 changed files with 13 additions and 14 deletions
|
|
@ -90,8 +90,7 @@ def _infer_go_version(version: str) -> str:
|
|||
if version != C.DEFAULT:
|
||||
return version
|
||||
resp = urllib.request.urlopen('https://go.dev/dl/?mode=json')
|
||||
# TODO: 3.9+ .removeprefix('go')
|
||||
return json.load(resp)[0]['version'][2:]
|
||||
return json.load(resp)[0]['version'].removeprefix('go')
|
||||
|
||||
|
||||
def _get_url(version: str) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue