The recent introduction of f-strings require >=Python3.6
Fix a couple of pycodestyle warnings.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id9e375bb8febb157d7f9d7fa21808724770df6f8
import sys
from subprocess import Popen, PIPE
import sys
from subprocess import Popen, PIPE
+assert sys.version_info >= (3, 6), \
+ "Not supported Python version: {}".format(sys.version)
log = logging.getLogger('vppapigen')
# Ensure we don't leave temporary files around
log = logging.getLogger('vppapigen')
# Ensure we don't leave temporary files around
self.options[b.option] = b.value
remove.append(b)
self.options[b.option] = b.value
remove.append(b)
- block = [x for x in block if not x in remove]
+ block = [x for x in block if x not in remove]
self.block = block
self.vla = vla_is_last_check(name, block)
self.crc = str(block).encode()
self.block = block
self.vla = vla_is_last_check(name, block)
self.crc = str(block).encode()
block = [Field('u32', 'context'),
Field('i32', 'retval')]
# inherhit the parent's options
block = [Field('u32', 'context'),
Field('i32', 'retval')]
# inherhit the parent's options
- for k,v in parent.options.items():
+ for k, v in parent.options.items():
block.append(Option(k, v))
return Define(name + '_reply', [], block)
block.append(Option(k, v))
return Define(name + '_reply', [], block)