mirror of
https://github.com/flatpak/flatpak.git
synced 2026-07-17 03:23:40 -04:00
flatpak-coredumpctl: Explicitly indicate type for DebugDumpArgs.target
Fixes a type check error with mypy Other members had their type hints moved to the class body as well for consistency
This commit is contained in:
@@ -36,6 +36,11 @@ class DebugDumpArgs:
|
||||
class BuildDir:
|
||||
directory: str
|
||||
|
||||
target: AppId | BuildDir
|
||||
coredumpctl_matches: str
|
||||
extra_flatpak_args: str
|
||||
gdb_arguments: str
|
||||
|
||||
def __init__(self, ns: argparse.Namespace) -> None:
|
||||
if ns.app is None and ns.build_directory is None:
|
||||
raise ValueError("Either `--build-directory` or `APP` must be specified.")
|
||||
@@ -45,9 +50,9 @@ class DebugDumpArgs:
|
||||
self.target = self.AppId(ns.app)
|
||||
else:
|
||||
self.target = self.BuildDir(ns.build_directory)
|
||||
self.coredumpctl_matches: str = ns.coredumpctl_matches
|
||||
self.extra_flatpak_args: str = ns.extra_flatpak_args
|
||||
self.gdb_arguments: str = ns.gdb_arguments
|
||||
self.coredumpctl_matches= ns.coredumpctl_matches
|
||||
self.extra_flatpak_args = ns.extra_flatpak_args
|
||||
self.gdb_arguments = ns.gdb_arguments
|
||||
|
||||
def debug_dump(args: DebugDumpArgs) -> int:
|
||||
match args.target:
|
||||
|
||||
Reference in New Issue
Block a user