mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-09 21:04:39 +00:00
Make ty 79 happy
This commit is contained in:
parent
1433653e7c
commit
024d34ec8a
5 changed files with 6 additions and 6 deletions
|
|
@ -84,7 +84,7 @@ class PathCompleter:
|
|||
|
||||
from .dircolors import Dircolors
|
||||
|
||||
if 'libedit' in getattr(readline, '__doc__', '') or '':
|
||||
if 'libedit' in getattr(readline, '__doc__', '') or '': # ty: ignore[redundant-condition]
|
||||
readline.parse_and_bind('bind -e')
|
||||
readline.parse_and_bind("bind '\t' rl_complete")
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ class Boss:
|
|||
with Window.set_ignore_focus_changes_for_new_windows():
|
||||
for startup_session in si:
|
||||
# The window state from the CLI options will override and apply to every single OS window in startup session
|
||||
wstate = self.args.start_as if self.args.start_as and self.args.start_as != 'normal' else None
|
||||
wstate = self.args.start_as if self.args.start_as and self.args.start_as != 'normal' else None # ty: ignore[redundant-condition]
|
||||
wid = self.add_os_window(startup_session, window_state=wstate, os_window_id=os_window_id)
|
||||
if startup_session.focus_os_window:
|
||||
focused_os_window = wid
|
||||
|
|
@ -1065,7 +1065,7 @@ class Boss:
|
|||
assert isinstance(window.launch_spec, LaunchSpec)
|
||||
launch(get_boss(), window.launch_spec.opts, window.launch_spec.args)
|
||||
continue
|
||||
wstate = args.start_as if args.start_as and args.start_as != 'normal' else None
|
||||
wstate = args.start_as if args.start_as and args.start_as != 'normal' else None # ty: ignore[redundant-condition]
|
||||
os_window_id = self.add_os_window(
|
||||
session,
|
||||
wclass=args.cls,
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ def parse_kittens_key(val: str, funcs_with_args: dict[str, KeyFunc[tuple[str, An
|
|||
def uniq(vals: Iterable[T]) -> list[T]:
|
||||
seen: set[T] = set()
|
||||
seen_add = seen.add
|
||||
return [x for x in vals if x not in seen and not seen_add(x)]
|
||||
return [x for x in vals if x not in seen and not seen_add(x)] # ty: ignore[redundant-condition]
|
||||
|
||||
|
||||
def save_type_stub(text: str, fpath: str) -> None:
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = (),
|
|||
startup_sessions = tuple(create_sessions(opts, args))
|
||||
wincls = (startup_sessions[0].os_window_class if startup_sessions else '') or args.cls or appname
|
||||
winname = (startup_sessions[0].os_window_name if startup_sessions else '') or args.name or wincls or appname
|
||||
window_state = (args.start_as if args.start_as and args.start_as != 'normal' else None) or (
|
||||
window_state = (args.start_as if args.start_as and args.start_as != 'normal' else None) or ( # ty: ignore[redundant-condition]
|
||||
getattr(startup_sessions[0], 'os_window_state', None) if startup_sessions else None
|
||||
)
|
||||
# Remember the maximized state from the previous session, if enabled.
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ class ArgsHandling:
|
|||
c = self.args_count
|
||||
if c is not None:
|
||||
yield f'{go_name}.StopCompletingAtArg = {c}'
|
||||
if self.completion:
|
||||
if self.completion: # ty: ignore[redundant-condition]
|
||||
yield from self.completion.as_go_code(go_name + '.ArgCompleter', ' = ')
|
||||
|
||||
def as_go_code(self, cmd_name: str, field_types: dict[str, str], handled_fields: set[str]) -> Iterator[str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue