upgrade hooks, pyupgrade pre-commit

This commit is contained in:
Anthony Sottile 2020-01-08 20:49:09 -08:00
parent 764c765d29
commit 30c1e8289f
91 changed files with 176 additions and 437 deletions

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import contextlib
import logging
@ -19,14 +17,14 @@ LOG_LEVEL_COLORS = {
class LoggingHandler(logging.Handler):
def __init__(self, use_color):
super(LoggingHandler, self).__init__()
super().__init__()
self.use_color = use_color
def emit(self, record):
output.write_line(
'{} {}'.format(
color.format_color(
'[{}]'.format(record.levelname),
f'[{record.levelname}]',
LOG_LEVEL_COLORS[record.levelname],
self.use_color,
),