lib, cmds: Add exhaustive match cases
Add 'case _: pass' to match statements that are intentionally non-exhaustive, satisfying the new exhaustive-match mypy rule. Also replaced 'case '_':' (a string literal) with 'case _: pass' in pkg_relations.py since it was an unreachable case (syntax is a VersionSyntax enum, not a str). Added 'case VersionSyntax.names_only:' to the match in pkg_relations.py to handle the missing enum value. Files modified: - util.py: Two match statements for askpass env vars - Distro.py: Three match statements for backend/os detection - pkg_relations.py: Match on VersionSyntax enum - CmdListRepos.py: Match on URL scheme Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
a3e46121da
commit
55b63ded69
4 changed files with 16 additions and 5 deletions
|
|
@ -122,6 +122,8 @@ async def run_askpass(
|
|||
continue # Can't get user name from SSH_ASKPASS
|
||||
case AskpassKey.Password:
|
||||
exe_arg += 'Password'
|
||||
case _:
|
||||
pass
|
||||
result = await run_cmd([exe, exe_arg], throw = throw, ec = ec)
|
||||
if result.status == 0 and result.stdout_or_none is not None:
|
||||
ret = result.stdout_str_or_none
|
||||
|
|
|
|||
Loading…
Reference in a new issue