aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-12-05 08:24:56 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2019-12-05 22:15:40 +0200
commite88b3c802250feceaf5fb2950ce7847e6a91626f (patch)
tree0cb037a1e4ddd203ce18ecceb0de6255242953a3 /mesonbuild/compilers/rust.py
parentc616686d5db66f60b344eeae4623361f8ae790b7 (diff)
downloadmeson-e88b3c802250feceaf5fb2950ce7847e6a91626f.zip
meson-e88b3c802250feceaf5fb2950ce7847e6a91626f.tar.gz
meson-e88b3c802250feceaf5fb2950ce7847e6a91626f.tar.bz2
build: Fix type signature of rich comparison dunders
There are three problems: 1) Dunders like `__lt__` and `__gt__` don't return bool, they return either a bool or the NotImplemented singleton to signal that they don't know how to be compared. 2) The don't take type object, the take `typing.Any` 3) They need to return NotImplemented if the comparison is not implemented, this allows python to try the inverse dunder from the other object. If that object returns NotImplemented as well a TypeError is raised.
Diffstat (limited to 'mesonbuild/compilers/rust.py')
0 files changed, 0 insertions, 0 deletions