mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
config/__init__: l
is too ambiguous
flake8 6.0.0 complained about `l` here, but strangely not the other single-letter variable names. I figured I might as well rename those as well.
This commit is contained in:
parent
ab979ed043
commit
baadf10158
@ -319,17 +319,17 @@ class AbstractConfig(abc.ABC):
|
||||
warnings.warn(DeprecationWarning('get is Deprecated. use the specific getter for your type'))
|
||||
logger.debug('Attempt to use Deprecated get() method\n' + ''.join(traceback.format_stack()))
|
||||
|
||||
if (l := self._suppress_call(self.get_list, ValueError, key, default=None)) is not None:
|
||||
return l
|
||||
if (a_list := self._suppress_call(self.get_list, ValueError, key, default=None)) is not None:
|
||||
return a_list
|
||||
|
||||
elif (s := self._suppress_call(self.get_str, ValueError, key, default=None)) is not None:
|
||||
return s
|
||||
elif (a_str := self._suppress_call(self.get_str, ValueError, key, default=None)) is not None:
|
||||
return a_str
|
||||
|
||||
elif (b := self._suppress_call(self.get_bool, ValueError, key, default=None)) is not None:
|
||||
return b
|
||||
elif (a_bool := self._suppress_call(self.get_bool, ValueError, key, default=None)) is not None:
|
||||
return a_bool
|
||||
|
||||
elif (i := self._suppress_call(self.get_int, ValueError, key, default=None)) is not None:
|
||||
return i
|
||||
elif (an_int := self._suppress_call(self.get_int, ValueError, key, default=None)) is not None:
|
||||
return an_int
|
||||
|
||||
return default # type: ignore
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user