osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/python/pyosmocom/+/41385?usp=email )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )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(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  osmith: Verified
  laforge: Looks good to me, approved




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

--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/41385?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I2ebb33c498b4a7e6229980462aa51b579fa4f782
Gerrit-Change-Number: 41385
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to