summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-02-03 11:34:57 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-02-03 21:49:53 -0800
commit0e6e68786ccea602b0343e0e104278352e4ee89a (patch)
treee92d6ca8f8ad0b7f0cba3ab229766ac56103f2da /mesonbuild/compilers/cpp.py
parent3a4cb94e949a94fdfb921a2df7f898ec8c70811a (diff)
downloadmeson-0e6e68786ccea602b0343e0e104278352e4ee89a.tar.gz
minstall: help mypy out with our chown overriding
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.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
0 files changed, 0 insertions, 0 deletions