further fixes of py3 issues
complaints by pylint are mainly related to - remove object from base list in class definitions - unnecessary else/elif after return/raise Change-Id: I13d15449149cc8bba0562338d0c9c42e97163bdf Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21325 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -149,7 +149,7 @@ def format_args(args):
|
||||
return repr(args) # for floats/ints/...
|
||||
|
||||
|
||||
class ArgsParser(object):
|
||||
class ArgsParser:
|
||||
"""returns a pythonic object from the input expression
|
||||
|
||||
grammar:
|
||||
@ -164,10 +164,8 @@ class ArgsParser(object):
|
||||
name = [A-Za-z_] [A-Za-z0-9_]*
|
||||
"""
|
||||
|
||||
DIGITS_CHARS = [c for c in '0123456789']
|
||||
NAME_CHARS = [
|
||||
c for c in '_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
]
|
||||
DIGITS_CHARS = '0123456789'
|
||||
NAME_CHARS = '_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
NAME_CHARS2 = NAME_CHARS + DIGITS_CHARS
|
||||
|
||||
def __init__(self, string=''):
|
||||
@ -276,7 +274,7 @@ class ArgsParser(object):
|
||||
|
||||
def parse_record(self):
|
||||
"""record_expr = '(' (name '=' expr ',')* ')' """
|
||||
if self.get != '(':
|
||||
if self.get() != '(':
|
||||
return None
|
||||
self.skip()
|
||||
res = {}
|
||||
|
Reference in New Issue
Block a user