Skip to content

Changes

Started 18 hr ago
Queued 9.2 sec
Took 27 min on built-in
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
Oliver Smith at
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
Oliver Smith at