diff --git a/ulwgl_dl_util.py b/ulwgl_dl_util.py index 16a2cc82..59df2c7f 100644 --- a/ulwgl_dl_util.py +++ b/ulwgl_dl_util.py @@ -178,8 +178,8 @@ def _get_from_steamcompat( # Notify the user that they're not using the latest if proton_dir and proton.name != proton_dir: print( - "ULWGL-Proton is outdated.\nFor latest release, please download " - + files[1][1], + "ULWGL-Proton is outdated.\n" + "For latest release, please download " + files[1][1], file=sys.stderr ) diff --git a/ulwgl_run.py b/ulwgl_run.py index d1537f0a..a7d7f55d 100755 --- a/ulwgl_run.py +++ b/ulwgl_run.py @@ -17,15 +17,15 @@ def parse_args() -> Union[Namespace, Tuple[str, List[str]]]: # noqa: D103 opt_args: Set[str] = {"--help", "-h", "--config"} exe: str = Path(__file__).name - usage: str = f""" -example usage: - WINEPREFIX= GAMEID= PROTONPATH= {exe} /home/foo/example.exe - WINEPREFIX= GAMEID= PROTONPATH= {exe} /home/foo/example.exe -opengl - WINEPREFIX= GAMEID= PROTONPATH= {exe} "" - WINEPREFIX= GAMEID= PROTONPATH= PROTON_VERB= {exe} /home/foo/example.exe - WINEPREFIX= GAMEID= PROTONPATH= STORE= {exe} /home/foo/example.exe - {exe} --config /home/foo/example.toml - """ + usage: str = ( + "example usage:\n" + f" WINEPREFIX= GAMEID= PROTONPATH= {exe} /home/foo/example.exe\n" + f" WINEPREFIX= GAMEID= PROTONPATH= {exe} /home/foo/example.exe -opengl\n" + f" WINEPREFIX= GAMEID= PROTONPATH= {exe} \"\"\n" + f" WINEPREFIX= GAMEID= PROTONPATH= PROTON_VERB= {exe} /home/foo/example.exe\n" + f" WINEPREFIX= GAMEID= PROTONPATH= STORE= {exe} /home/foo/example.exe\n" + f" {exe} --config /home/foo/example.toml\n" + ) parser: ArgumentParser = argparse.ArgumentParser( description="Unified Linux Wine Game Launcher", epilog=usage, @@ -34,7 +34,8 @@ def parse_args() -> Union[Namespace, Tuple[str, List[str]]]: # noqa: D103 parser.add_argument("--config", help="path to TOML file") if not sys.argv[1:]: - err: str = "Please see project README.md for more info and examples.\nhttps://github.com/Open-Wine-Components/ULWGL-launcher" + err: str = ("Please see project README.md for more info and examples.\n" + "https://github.com/Open-Wine-Components/ULWGL-launcher") parser.print_help(sys.stderr) raise SystemExit(err) @@ -98,7 +99,8 @@ def check_env( # Check for empty keys for key, val in toml[table].items(): if not val and isinstance(val, str): - err: str = f"Value is empty for '{key}' in TOML.\nPlease specify a value or remove the following entry:\n{key} = {val}" + err: str = (f"Value is empty for '{key}' in TOML.\n" + f"Please specify a value or remove the following entry:\n{key} = {val}") raise ValueError(err) return toml @@ -128,7 +130,11 @@ def check_env( # If download fails/doesn't exist in the system, raise an error if not os.environ["PROTONPATH"]: - err: str = "Download failed.\nProton could not be found in cache or compatibilitytools.d\nPlease set $PROTONPATH or visit https://github.com/Open-Wine-Components/ULWGL-Proton/releases" + err: str = ( + "Download failed.\n" + "Proton could not be found in cache or compatibilitytools.d\n" + "Please set $PROTONPATH or visit https://github.com/Open-Wine-Components/ULWGL-Proton/releases" + ) raise FileNotFoundError(err) return env