mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 09:26:16 +00:00
clean code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user