No global typing issues in all code (excluding tests)

This commit is contained in:
Kovid Goyal
2020-03-04 08:08:46 +05:30
parent 36eb52424f
commit 8ad62106e0
4 changed files with 20 additions and 13 deletions

View File

@@ -16,6 +16,7 @@ import sys
import tempfile
import time
from contextlib import suppress
from typing import cast
import requests
@@ -25,11 +26,11 @@ docs_dir = os.path.abspath('docs')
publish_dir = os.path.abspath(os.path.join('..', 'kovidgoyal.github.io', 'kitty'))
with open('kitty/constants.py') as f:
raw = f.read()
nv = re.search(
r'^version\s+=\s+\((\d+), (\d+), (\d+)\)', raw, flags=re.MULTILINE)
nv = cast(re.Match, re.search(
r'^version\s+=\s+\((\d+), (\d+), (\d+)\)', raw, flags=re.MULTILINE))
version = '%s.%s.%s' % (nv.group(1), nv.group(2), nv.group(3))
appname = re.search(
r"^appname\s+=\s+'([^']+)'", raw, flags=re.MULTILINE).group(1)
appname = cast(re.Match, re.search(
r"^appname\s+=\s+'([^']+)'", raw, flags=re.MULTILINE)).group(1)
ALL_ACTIONS = 'man html build tag sdist upload website'.split()