fix(types): add some type annotations

This commit is contained in:
Daylin Morgan 2023-08-22 21:57:45 -05:00
parent a4b81d17ce
commit cd0f4d5c95
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -52,7 +52,7 @@ from typing import (
Union, Union,
) )
__version__ = "23.8b2-14-g44c8bea-dev" __version__ = "23.8b2-15-ga4b81d1-dev"
class Spinner: class Spinner:
@ -936,7 +936,7 @@ class ViVenv:
return vivenv return vivenv
def exists(self): def exists(self) -> None:
if self.name in (d.name for d in Cfg().cache_venv.iterdir()): if self.name in (d.name for d in Cfg().cache_venv.iterdir()):
self.loaded = True self.loaded = True
@ -1051,7 +1051,7 @@ class ViVenv:
run_mode = Env().viv_run_mode run_mode = Env().viv_run_mode
_path = self.path _path = self.path
def common(): def common() -> None:
self.ensure() self.ensure()
self.touch() self.touch()
@ -1748,7 +1748,7 @@ class Viv:
make_executable(output) make_executable(output)
@staticmethod @staticmethod
def _update_cache(env: Dict[str, str], keep: bool, tmpdir: str): def _update_cache(env: os._Environ[str], keep: bool, tmpdir: str) -> None:
run_mode = Env().viv_run_mode run_mode = Env().viv_run_mode
if not keep: if not keep:
if run_mode == "ephemeral": if run_mode == "ephemeral":