summaryrefslogtreecommitdiffstats
path: root/deluge/log.py
diff options
context:
space:
mode:
authorDjLegolas <djlegolas@protonmail.com>2021-12-28 22:20:57 +0200
committerCalum Lind <calumlind+deluge@gmail.com>2021-12-29 21:51:07 +0000
commitec0bcc11f510cd113bbdb6cd551b27c697f03f53 (patch)
treec60c19a61a14fa157227ad7531406f250493b78e /deluge/log.py
parent16895b4a492aedca8bcc2929a905207341c36b35 (diff)
downloaddeluge-ec0bcc11f510cd113bbdb6cd551b27c697f03f53.tar.gz
deluge-ec0bcc11f510cd113bbdb6cd551b27c697f03f53.tar.bz2
deluge-ec0bcc11f510cd113bbdb6cd551b27c697f03f53.zip
Upgrade codebase with pyupgrade (>=py3.6)
Added pyupgrade utility with manual stage to pre-commit and run on all files. Ref: https://github.com/asottile/pyupgrade Closes: deluge-torrent/deluge#326
Diffstat (limited to 'deluge/log.py')
-rw-r--r--deluge/log.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/deluge/log.py b/deluge/log.py
index 868be4593..265186e7e 100644
--- a/deluge/log.py
+++ b/deluge/log.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2010 Pedro Algarvio <pedro@algarvio.me>
@@ -37,7 +36,7 @@ MAX_LOGGER_NAME_LENGTH = 10
class Logging(LoggingLoggerClass):
def __init__(self, logger_name):
- super(Logging, self).__init__(logger_name)
+ super().__init__(logger_name)
# This makes module name padding increase to the biggest module name
# so that logs keep readability.
@@ -238,7 +237,7 @@ def tweak_logging_levels():
log.warning(
'logging.conf found! tweaking logging levels from %s', logging_config_file
)
- with open(logging_config_file, 'r') as _file:
+ with open(logging_config_file) as _file:
for line in _file:
if line.strip().startswith('#'):
continue
@@ -309,7 +308,7 @@ Triggering code:
"""
-class _BackwardsCompatibleLOG(object):
+class _BackwardsCompatibleLOG:
def __getattribute__(self, name):
import warnings