From 9432f86e43347498bea3292076df485a11a0fdc5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 9 Jun 2021 08:30:22 +0530 Subject: [PATCH] Remove no longer needed type: ignore Looks like the type signature for runpy.run_path has finally been fixed --- kittens/runner.py | 2 +- kitty/launch.py | 2 +- kitty/marks.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kittens/runner.py b/kittens/runner.py index 4bac39847..12c9b6e9e 100644 --- a/kittens/runner.py +++ b/kittens/runner.py @@ -121,7 +121,7 @@ def run_kitten(kitten: str, run_name: str = '__main__') -> None: for kitten in all_kitten_names(): print(kitten, file=sys.stderr) raise SystemExit('No kitten named {}'.format(original_kitten_name)) - m = runpy.run_path(path, init_globals={'sys': sys, 'os': os}, run_name='__run_kitten__') # type: ignore + m = runpy.run_path(path, init_globals={'sys': sys, 'os': os}, run_name='__run_kitten__') m['main'](sys.argv) diff --git a/kitty/launch.py b/kitty/launch.py index 1b695af50..bdbadcf91 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -221,7 +221,7 @@ def load_watch_modules(watchers: Sequence[str]) -> Optional[Watchers]: ans = Watchers() for path in watchers: path = resolve_custom_file(path) - m = runpy.run_path(path, run_name='__kitty_watcher__') # type: ignore + m = runpy.run_path(path, run_name='__kitty_watcher__') w = m.get('on_close') if callable(w): ans.on_close.append(w) diff --git a/kitty/marks.py b/kitty/marks.py index 91362d8dc..adcc0d1ca 100644 --- a/kitty/marks.py +++ b/kitty/marks.py @@ -91,5 +91,5 @@ def marker_from_spec(ftype: str, spec: Union[str, Sequence[Tuple[int, str]]], fl path = spec if not os.path.isabs(path): path = os.path.join(config_dir, path) - return marker_from_function(runpy.run_path(path, run_name='__marker__')["marker"]) # type: ignore + return marker_from_function(runpy.run_path(path, run_name='__marker__')["marker"]) raise ValueError('Unknown marker type: {}'.format(ftype)) diff --git a/setup.py b/setup.py index 72c8e7bb8..a8218a733 100755 --- a/setup.py +++ b/setup.py @@ -1086,7 +1086,7 @@ def package(args: Options, bundle_type: str) -> None: else: build_launcher(args, launcher_dir, bundle_type) os.makedirs(os.path.join(libdir, 'logo')) - build_terminfo = runpy.run_path('build-terminfo', run_name='import_build') # type: ignore + build_terminfo = runpy.run_path('build-terminfo', run_name='import_build') for x in (libdir, os.path.join(ddir, 'share')): odir = os.path.join(x, 'terminfo') safe_makedirs(odir)