From 4e318d516531e6a9c683b21e58b9cb48131eb175 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 1 Sep 2026 23:02:48 +0200 Subject: [PATCH] deadcode --- copyparty/cert.py | 3 +++ copyparty/httpconn.py | 1 - copyparty/httpsrv.py | 1 - copyparty/pwhash.py | 3 ++- copyparty/sftpd.py | 1 - copyparty/smbd.py | 2 +- copyparty/ssdp.py | 1 - copyparty/svchub.py | 1 - copyparty/tcpsrv.py | 1 - copyparty/up2k.py | 3 --- copyparty/util.py | 1 - 11 files changed, 6 insertions(+), 12 deletions(-) diff --git a/copyparty/cert.py b/copyparty/cert.py index 82e495381..fc1aad25d 100644 --- a/copyparty/cert.py +++ b/copyparty/cert.py @@ -1,3 +1,6 @@ +# coding: utf-8 +from __future__ import division, print_function, unicode_literals + import calendar import errno import json diff --git a/copyparty/httpconn.py b/copyparty/httpconn.py index 0dddbdb4c..4ed4a27b1 100644 --- a/copyparty/httpconn.py +++ b/copyparty/httpconn.py @@ -2,7 +2,6 @@ from __future__ import division, print_function, unicode_literals import argparse # typechk -import os import re import socket import threading # typechk diff --git a/copyparty/httpsrv.py b/copyparty/httpsrv.py index 2d13776b7..6628059eb 100644 --- a/copyparty/httpsrv.py +++ b/copyparty/httpsrv.py @@ -2,7 +2,6 @@ from __future__ import division, print_function, unicode_literals import hashlib -import math import os import re import socket diff --git a/copyparty/pwhash.py b/copyparty/pwhash.py index 72d692457..efb74085b 100644 --- a/copyparty/pwhash.py +++ b/copyparty/pwhash.py @@ -14,8 +14,9 @@ try: if os.environ.get("PRTY_NO_ARGON2"): raise Exception() - HAVE_ARGON2 = True from argon2 import exceptions as argon2ex + + HAVE_ARGON2 = True except: HAVE_ARGON2 = False diff --git a/copyparty/sftpd.py b/copyparty/sftpd.py index e1f4fe56a..214a5081b 100644 --- a/copyparty/sftpd.py +++ b/copyparty/sftpd.py @@ -8,7 +8,6 @@ import os import select import socket import time -from threading import ExceptHookArgs import paramiko import paramiko.common diff --git a/copyparty/smbd.py b/copyparty/smbd.py index 3ae41091a..59a320d82 100644 --- a/copyparty/smbd.py +++ b/copyparty/smbd.py @@ -12,7 +12,7 @@ from types import SimpleNamespace from .__init__ import ANYWIN, EXE, TYPE_CHECKING from .authsrv import LEELOO_DALLAS, VFS from .bos import bos -from .util import Daemon, absreal, min_ex, pybin, runhook, vjoin +from .util import Daemon, absreal, min_ex, pybin, runhook if True: # pylint: disable=using-constant-test from typing import Any, Union diff --git a/copyparty/ssdp.py b/copyparty/ssdp.py index d9ce7d012..0f5026288 100644 --- a/copyparty/ssdp.py +++ b/copyparty/ssdp.py @@ -5,7 +5,6 @@ import errno import re import select import socket -import time from .__init__ import TYPE_CHECKING from .multicast import MC_Sck, MCast diff --git a/copyparty/svchub.py b/copyparty/svchub.py index bbc0eee2c..6b1dffe4f 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -81,7 +81,6 @@ from .util import ( alltrace, build_netmap, expat_ver, - fsenc, gzip, html_escape, load_ipr, diff --git a/copyparty/tcpsrv.py b/copyparty/tcpsrv.py index 961529425..3c523ba5c 100644 --- a/copyparty/tcpsrv.py +++ b/copyparty/tcpsrv.py @@ -22,7 +22,6 @@ from .util import ( Netdev, atomic_move, chkcmd, - get_adapters, list_nics, min_ex, sunpack, diff --git a/copyparty/up2k.py b/copyparty/up2k.py index e5375db91..50e8db3a8 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -4,12 +4,9 @@ from __future__ import division, print_function, unicode_literals import errno import hashlib import json -import math import os import re -import shutil import stat -import subprocess as sp import sys import tempfile import threading diff --git a/copyparty/util.py b/copyparty/util.py index 73de1e6bd..554a46961 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -10,7 +10,6 @@ import hashlib import hmac import json import logging -import math import mimetypes import os import platform