distutils
distutils copied to clipboard
`spawn`: don't force param `cmd` to be mutable
This has 2 advantages:
-
cmddoesn't have to be mutable. Sotuplesare usable - It actually improves the generic type because
MutableSequenceis invariant. which can cause issues with union types since you need to match the exact full union type (some checkers do allow partial union match for inline/literal sequences)
I also improved the possible param types by using an overload on search_path (since search_path allows bytes | str | PathLike[str], but not PathLike[bytes])
Open question: Since verbose isn't used in spawn, maybe it's better to not even expose it as a possible kwargs in Compiler classes ? (no runtime change, just hiding it from the type annotation in wrapper methods)