1
0
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:
Athanasius 2022-12-05 16:05:23 +00:00
parent ab979ed043
commit baadf10158
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -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