diff options
author | Sandro-Alessio Gierens <sandro@gierens.de> | 2023-08-15 16:07:47 +0200 |
---|---|---|
committer | Sandro-Alessio Gierens <49617392+gierens@users.noreply.github.com> | 2023-08-15 16:50:05 +0200 |
commit | 4635ac635813b97d68fa55fe1e15db0f3c460212 (patch) | |
tree | aca1f6389ee8f5eea6fca5a162bfb489bc24648b /test | |
parent | da8fbe8b43192fc509a89dd29159ad67a219b209 (diff) | |
download | libvfio-user-4635ac635813b97d68fa55fe1e15db0f3c460212.zip libvfio-user-4635ac635813b97d68fa55fe1e15db0f3c460212.tar.gz libvfio-user-4635ac635813b97d68fa55fe1e15db0f3c460212.tar.bz2 |
Revise iovec_t.__eq__ and vfu_dma_info_t.__eq__ to fix flake8 E721
The newer flake8 version in the arch linux job of the pull request
workflow fails due to:
E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
Both `__eq__` functions now use `is not` instead of `!=` for the type
initial check.
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/py/libvfio_user.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/libvfio_user.py b/test/py/libvfio_user.py index 6d60798..f29b50e 100644 --- a/test/py/libvfio_user.py +++ b/test/py/libvfio_user.py @@ -315,7 +315,7 @@ class iovec_t(Structure): ] def __eq__(self, other): - if type(self) != type(other): + if type(self) is not type(other): return False return self.iov_base == other.iov_base \ and self.iov_len == other.iov_len @@ -491,7 +491,7 @@ class vfu_dma_info_t(Structure): ] def __eq__(self, other): - if type(self) != type(other): + if type(self) is not type(other): return False return self.iova == other.iova \ and self.vaddr == other.vaddr \ |