aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minstall.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-03-09 10:20:57 -0800
committerEli Schwartz <eschwartz93@gmail.com>2023-03-09 19:03:44 -0500
commit7c2ac4f8fe2bda306adc73572d8f8e43010456cb (patch)
tree97c23889e0aec53ff81e12ddc19acfae00e26267 /mesonbuild/minstall.py
parent62c269d08859747ba558e90bc98505e6325ef678 (diff)
downloadmeson-7c2ac4f8fe2bda306adc73572d8f8e43010456cb.zip
meson-7c2ac4f8fe2bda306adc73572d8f8e43010456cb.tar.gz
meson-7c2ac4f8fe2bda306adc73572d8f8e43010456cb.tar.bz2
utils: fix annotation of pickle_load
It's actually Generic, and we should use Generic annotations to get the correct result. This means that we don't have to assert or cast the return type, because mypy just knowns
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r--mesonbuild/minstall.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index 969e09e..6922c38 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -131,9 +131,7 @@ class DirMaker:
def load_install_data(fname: str) -> InstallData:
- obj = pickle_load(fname, 'InstallData', InstallData)
- assert isinstance(obj, InstallData), 'fo mypy'
- return obj
+ return pickle_load(fname, 'InstallData', InstallData)
def is_executable(path: str, follow_symlinks: bool = False) -> bool:
'''Checks whether any of the "x" bits are set in the source file mode.'''