diff --git a/publish.py b/publish.py index 698ab1e38..749bd2ed8 100755 --- a/publish.py +++ b/publish.py @@ -29,7 +29,7 @@ with open('kitty/constants.py') as f: nv = re.search(r'^version\s+=\s+Version\((\d+), (\d+), (\d+)\)', raw, flags=re.MULTILINE) if nv is not None: 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) # type: ignore +appname = re.search(r"^appname: str\s+=\s+'([^']+)'", raw, flags=re.MULTILINE).group(1) # type: ignore ALL_ACTIONS = 'man html build tag sdist upload website'.split() diff --git a/setup.py b/setup.py index f9f4c4dcc..a4d364b9f 100755 --- a/setup.py +++ b/setup.py @@ -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) ) )