diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-12-05 08:24:56 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-05 22:15:40 +0200 |
commit | e88b3c802250feceaf5fb2950ce7847e6a91626f (patch) | |
tree | 0cb037a1e4ddd203ce18ecceb0de6255242953a3 /mesonbuild/compilers/rust.py | |
parent | c616686d5db66f60b344eeae4623361f8ae790b7 (diff) | |
download | meson-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