This commit is contained in:
Kovid Goyal
2020-03-15 13:30:02 +05:30
parent 382c31ddf2
commit 90f41108d3
2 changed files with 3 additions and 3 deletions

View File

@@ -35,12 +35,12 @@ build_dir = 'build'
constants = os.path.join('kitty', 'constants.py')
with open(constants, 'rb') as f:
constants = f.read().decode('utf-8')
appname = re.search(r"^appname = '([^']+)'", constants, re.MULTILINE).group(1) # type: ignore
appname = re.search(r"^appname: str = '([^']+)'", constants, re.MULTILINE).group(1) # type: ignore
version = tuple(
map(
int,
re.search( # type: ignore
r"^version = Version\((\d+), (\d+), (\d+)\)", constants, re.MULTILINE
r"^version: Version = Version\((\d+), (\d+), (\d+)\)", constants, re.MULTILINE
).group(1, 2, 3)
)
)