mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-04 05:32:40 +02:00
Address code review: use url=None, add TypeError comment
This commit is contained in:
committed by
Kovid Goyal
parent
d8972f2f95
commit
3b15d86b64
5
.github/workflows/ci.py
vendored
5
.github/workflows/ci.py
vendored
@@ -116,12 +116,12 @@ def install_slang_compiler() -> None:
|
||||
version = release['tag_name'].lstrip('v')
|
||||
|
||||
asset_name = f'slang-{version}-{os_name}-{arch}.tar.gz'
|
||||
url = ''
|
||||
url = None
|
||||
for asset in release['assets']:
|
||||
if asset['name'] == asset_name:
|
||||
url = asset['browser_download_url']
|
||||
break
|
||||
if not url:
|
||||
if url is None:
|
||||
raise SystemExit(f'Could not find slang release asset: {asset_name}')
|
||||
|
||||
install_dir = '/tmp/slang'
|
||||
@@ -131,6 +131,7 @@ def install_slang_compiler() -> None:
|
||||
try:
|
||||
tf.extractall(install_dir, filter='fully_trusted')
|
||||
except TypeError:
|
||||
# filter parameter not supported on older Python versions
|
||||
tf.extractall(install_dir)
|
||||
|
||||
pc_dir = os.path.join(install_dir, 'lib', 'pkgconfig')
|
||||
|
||||
Reference in New Issue
Block a user