scripts: Remove unnecessary () around if/while conditions in Python

Not needed in Python. Detected by check C0325 in pylint3.

Also replace an

  if len(tag):

with just

  if tag:

Empty strings, byte strings, lists, etc., are falsy in Python.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-03-20 19:30:29 +01:00 committed by Kumar Gala
commit ba312fe844
12 changed files with 36 additions and 36 deletions

View file

@ -148,7 +148,7 @@ class AggregateTypeMember:
if member_offset[0] == 0x23:
self.member_offset = member_offset[1] & 0x7f
for i in range(1, len(member_offset)-1):
if (member_offset[i] & 0x80):
if member_offset[i] & 0x80:
self.member_offset += (
member_offset[i+1] & 0x7f) << i*7
else: