summaryrefslogtreecommitdiffstats
path: root/packaging
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 /packaging
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 'packaging')
-rwxr-xr-xpackaging/source/make_release.py3
-rw-r--r--packaging/win32/deluge-bbfreeze.py4
2 files changed, 2 insertions, 5 deletions
diff --git a/packaging/source/make_release.py b/packaging/source/make_release.py
index 38fc3d566..277d1cedc 100755
--- a/packaging/source/make_release.py
+++ b/packaging/source/make_release.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-# -*- coding: utf-8 -*-
#
# Copyright 2014 Calum Lind <calumlind@gmail.com>
#
@@ -46,7 +45,7 @@ else:
# Calculate shasum and add to sha256sums.txt
with open(tarxz_path, 'rb') as _file:
- sha256sum = '%s %s' % (
+ sha256sum = '{} {}'.format(
sha256(_file.read()).hexdigest(),
os.path.basename(tarxz_path),
)
diff --git a/packaging/win32/deluge-bbfreeze.py b/packaging/win32/deluge-bbfreeze.py
index 5cd3e35a7..340a643fd 100644
--- a/packaging/win32/deluge-bbfreeze.py
+++ b/packaging/win32/deluge-bbfreeze.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2015 Calum Lind <calumlind@gmail.com>
# Copyright (C) 2010 Damien Churchill <damoxc@gmail.com>
@@ -11,7 +10,6 @@
# See LICENSE for more details.
#
# isort:skip_file
-from __future__ import print_function
import glob
import os
@@ -27,7 +25,7 @@ from win32verstamp import stamp
import deluge.common
-class VersionInfo(object):
+class VersionInfo:
def __init__(
self,
version,