clean code

This commit is contained in:
Florian Bezannier
2022-03-29 20:56:37 +02:00
parent ef8d1dbe11
commit f436355424
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -8,13 +8,20 @@ logging.addLevelName(DEBUG_LEVELV_NUM, "DEBUGV")
class CustomLogger(logging.Logger):
# pylint: disable=too-many-arguments,unused-argument,arguments-differ
def _log(self, level, msg, args, exc_info=None, extra=None, stack_info=False, exc_info_debug=False, **kwargs):
def _log(self, level,
msg,
args,
exc_info=None,
extra=None,
stack_info=False,
exc_info_debug=False,
**kwargs): # pylint: disable=too-many-arguments,unused-argument,arguments-differ
if exc_info_debug and self.isEnabledFor(logging.DEBUG):
exc_info = True
super()._log(level, msg, args, exc_info, extra, stack_info)
def __new_style_log(self, level, msg, args, exc_info=None, extra=None, stack_info=False, **kwargs):
def __new_style_log(self, level, msg, args, exc_info=None, extra=None, # pylint: disable=too-many-arguments
stack_info=False, **kwargs):
if kwargs.pop('style', "%") == "{": # optional
msg = msg.format(*args)
args = []
@@ -1,7 +1,7 @@
import logging
from datetime import datetime, timedelta
from statistics import mean, StatisticsError
import xml.etree.cElementTree as ElT
import xml.etree.ElementTree as ElT
import numbers
import requests