mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
upgrade hooks, pyupgrade pre-commit
This commit is contained in:
parent
764c765d29
commit
30c1e8289f
91 changed files with 176 additions and 437 deletions
|
|
@ -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,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue