This is an annoying issue to look at, because shutil.chown has (for our purposes) three signatures: ```python chown(path: int | AnyPathLike, uid: int | str, group: None = None) -> None: ... chown(path: int | AnyPathLike, uid: None, group: int | str) -> None: ... chown(path: int | AnyPathLike, uid: int | str, group: int | str) -> None: ... ``` This is a really difficult thing to guarantee from our code. We more or less depend on being able to pass two parameters of `None | int | str`, and it working. In our only caller we do ensure that at least one of the variables is not None, but convincing mypy of this is more work than it's worth. This will show up in our CI only for python >= 3.13. An updated typshed will make this show up for earlier versions, however. Pyright (which is used by the VSCode Python extension) will spot this for earlier versions. I have changed the code in such a way to make our CI turn green.pull/13423/merge
parent
3a4cb94e94
commit
0e6e68786c
1 changed files with 14 additions and 2 deletions
Loading…
Reference in new issue