osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/41385?usp=email )
Change subject: Fix lint errors: avoid equality comparisons to `False` ......................................................................
Fix lint errors: avoid equality comparisons to `False`
src/osmocom/utils.py:150:8: E712 Avoid equality comparisons to `False`; use `if not signed:` for false checks | 148 | """ 149 | 150 | if signed == False and number < 0: | ^^^^^^^^^^^^^^^ E712 151 | raise ValueError("expecting a positive number") | = help: Replace with `not signed`
Change-Id: I2ebb33c498b4a7e6229980462aa51b579fa4f782 --- M src/osmocom/utils.py 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/85/41385/1
diff --git a/src/osmocom/utils.py b/src/osmocom/utils.py index 3991da2..7963c05 100644 --- a/src/osmocom/utils.py +++ b/src/osmocom/utils.py @@ -147,7 +147,7 @@ Integer 'nbytes', which is the number of bytes required to encode 'number' """
- if signed == False and number < 0: + if not signed and number < 0: raise ValueError("expecting a positive number")
# Compute how many bytes we need for the absolute (positive) value of the given number