forked from LBRYCommunity/lbry-sdk
pylint
This commit is contained in:
parent
db25f3282e
commit
6fbbf36143
1 changed files with 3 additions and 2 deletions
|
@ -52,7 +52,7 @@ class ErrorClass:
|
||||||
|
|
||||||
def get_arguments(self):
|
def get_arguments(self):
|
||||||
args = ['self']
|
args = ['self']
|
||||||
for arg in re.findall('{([a-z0-1_\(\)]+)}', self.message):
|
for arg in re.findall('{([a-z0-1_()]+)}', self.message):
|
||||||
for func in FUNCTIONS:
|
for func in FUNCTIONS:
|
||||||
if arg.startswith(f'{func}('):
|
if arg.startswith(f'{func}('):
|
||||||
arg = arg[len(f'{func}('):-1]
|
arg = arg[len(f'{func}('):-1]
|
||||||
|
@ -60,7 +60,8 @@ class ErrorClass:
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def get_fields(self, args):
|
@staticmethod
|
||||||
|
def get_fields(args):
|
||||||
if len(args) > 1:
|
if len(args) > 1:
|
||||||
return f''.join(f'\n{INDENT*2}self.{field} = {field}' for field in args[1:])
|
return f''.join(f'\n{INDENT*2}self.{field} = {field}' for field in args[1:])
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Reference in a new issue