Skip to content

Commit

Permalink
Remove built-in function len used as condition (#1499)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibFrgsGmz authored Jun 21, 2022
1 parent 32d9a42 commit 7c3e606
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Autocoders/Python/bin/tlmLayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def identifier(self, line):
self.err_msg("Missing parameter(s) for identifier")

self.m_name = line[1].strip()
if not len(self.m_name):
if not self.m_name:
self.err_msg("Name cannot be blank")

if len(self.m_name.split()) > 1:
Expand Down Expand Up @@ -254,7 +254,7 @@ def item(self, line):
self.err_msg("Missing parameter(s) for item")

it.m_name = line[1].strip()
if not len(it.m_name):
if not it.m_name:
self.err_msg("Name cannot be blank")

if len(it.m_name.split()) > 1:
Expand Down Expand Up @@ -353,7 +353,7 @@ def constant(self, line):
it.m_is_constant = True

it.m_name = line[1].strip()
if not len(it.m_name):
if not it.m_name:
self.err_msg("Name cannot be blank")

if len(it.m_name.split()) > 1:
Expand Down Expand Up @@ -412,7 +412,7 @@ def packet_complete(self):
global tlm_period
global verbose

if not len(self.m_header_list) and not len(self.m_item_list):
if not self.m_header_list and not self.m_item_list:
return

self.m_bytes = (self.m_bit_index + 7) / 8
Expand Down Expand Up @@ -529,7 +529,7 @@ def process(self, line):

global tlm_input_line_num

if not len(line):
if not line:
return

nonblank = False
Expand Down

0 comments on commit 7c3e606

Please sign in to comment.