1- import inspect
2- from os import environ
31from pathlib import Path
42from typing import Any , Callable , NoReturn , Optional
53
64import click
7- from xdg import BaseDirectory
85
9- from . import __version__ , operations , profiles
6+ from . import operations , profiles
107from .profiles import Profile
118from .utils import SUPPORTED_MENUS , default_profile_dir , error , user_data_dir
129
13- CONTEXT_SETTINGS = dict ( help_option_names = ["-h" , "--help" ])
10+ CONTEXT_SETTINGS = { " help_option_names" : ["-h" , "--help" ]}
1411
1512
1613def creator_options (f : Callable [..., Any ]) -> Callable [..., Any ]:
@@ -100,7 +97,7 @@ def desktop(
10097 exit_with (operations .desktop (profile ))
10198
10299
103- @main .command (context_settings = dict ( ignore_unknown_options = True ) )
100+ @main .command (context_settings = { " ignore_unknown_options" : True } )
104101@click .argument ("profile_name" )
105102@click .argument ("qb_args" , nargs = - 1 , type = click .UNPROCESSED )
106103@click .option (
@@ -116,7 +113,7 @@ def launch(profile_dir: Path, profile_name: str, **kwargs: Any) -> None:
116113 exit_with (operations .launch (profile , ** kwargs ))
117114
118115
119- @main .command (context_settings = dict ( ignore_unknown_options = True ) )
116+ @main .command (context_settings = { " ignore_unknown_options" : True } )
120117@click .argument ("qb_args" , nargs = - 1 , type = click .UNPROCESSED )
121118@click .option (
122119 "-m" ,
@@ -173,7 +170,7 @@ def session_info(
173170) -> tuple [Profile , Path ]:
174171 user_session_dir = user_data_dir () / "sessions"
175172 session_paths = []
176- if not "/" in session :
173+ if "/" not in session :
177174 session_paths .append (user_session_dir / (session + ".yml" ))
178175 session_paths .append (Path (session ))
179176 session_path = next (filter (lambda path : path .is_file (), session_paths ), None )
0 commit comments