osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/python/pyosmocom/+/41386?usp=email )


Change subject: Fix lint errors: test for membership should be `not in`
......................................................................

Fix lint errors: test for membership should be `not in`

src/osmocom/tlv.py:477:16: E713 [*] Test for membership should be `not in`
    |
475 |         key-value pair, where the key is the snake-reformatted type name 
of 'self'"""
476 |         expected_key_name = camel_to_snake(type(self).__name__)
477 |         if not expected_key_name in decoded:
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E713
478 |             raise ValueError("Dict %s doesn't contain expected key %s" % 
(decoded, expected_key_name))
479 |         self.from_val_dict(decoded[expected_key_name])
    |
    = help: Convert to `not in`

Change-Id: I2ca3135f1ce38dcc06dc95c38f4b6258a60121cd
---
M src/osmocom/tlv.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom 
refs/changes/86/41386/1

diff --git a/src/osmocom/tlv.py b/src/osmocom/tlv.py
index 93e4e87..14c22f0 100644
--- a/src/osmocom/tlv.py
+++ b/src/osmocom/tlv.py
@@ -474,7 +474,7 @@
         This method is symmetrical to to_dict() above, i.e. the outer dict 
must contain just a single
         key-value pair, where the key is the snake-reformatted type name of 
'self'"""
         expected_key_name = camel_to_snake(type(self).__name__)
-        if not expected_key_name in decoded:
+        if expected_key_name not in decoded:
             raise ValueError("Dict %s doesn't contain expected key %s" % 
(decoded, expected_key_name))
         self.from_val_dict(decoded[expected_key_name])


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

Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I2ca3135f1ce38dcc06dc95c38f4b6258a60121cd
Gerrit-Change-Number: 41386
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to