Remove unused imports and shorten build timeouts

This commit is contained in:
Safihre
2025-11-21 11:29:53 +01:00
parent eb544d85c7
commit 27e164763e
11 changed files with 10 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ jobs:
build_windows:
name: Build Windows binary
runs-on: windows-2022
timeout-minutes: 30
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- name: Set up Python
@@ -83,8 +83,8 @@ jobs:
build_macos:
name: Build macOS binary
runs-on: macos-14
timeout-minutes: 30
runs-on: macos-latest
timeout-minutes: 15
env:
# We need the official Python, because the GA ones only support newer macOS versions
# The deployment target is picked up by the Python build tools automatically
@@ -160,7 +160,7 @@ jobs:
build-snap:
name: Build Snap Packages (${{ matrix.linux_arch }})
timeout-minutes: 30
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false

View File

@@ -39,7 +39,7 @@ from sabnzbd.filesystem import (
has_unwanted_extension,
get_basename,
)
from sabnzbd.constants import Status, GIGI, DEF_MAX_ASSEMBLER_QUEUE
from sabnzbd.constants import Status, GIGI
import sabnzbd.cfg as cfg
from sabnzbd.nzbstuff import NzbObject, NzbFile
import sabnzbd.par2file as par2file

View File

@@ -37,7 +37,6 @@ from sabnzbd.decorators import synchronized
from sabnzbd.newsunpack import RAR_EXTRACTFROM_RE, RAR_EXTRACTED_RE, rar_volumelist, add_time_left
from sabnzbd.postproc import prepare_extraction_path
from sabnzbd.misc import SABRarFile
import rarfile
from sabnzbd.utils.diskspeed import diskspeedmeasure
# Need a lock to make sure start and stop is handled correctly

View File

@@ -23,7 +23,7 @@ import asyncio
import os
import logging
import threading
from typing import Generator, Set, Optional, Tuple
from typing import Generator, Optional
import sabnzbd
from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES, VALID_NZB_FILES, AddNzbFileResult

View File

@@ -23,7 +23,6 @@ import socket
import threading
import time
import logging
import functools
from dataclasses import dataclass
from more_itertools import roundrobin
from typing import Union, Optional

View File

@@ -41,7 +41,7 @@ import math
import rarfile
from threading import Thread
from collections.abc import Iterable
from typing import Union, Tuple, Any, AnyStr, Optional, Collection
from typing import Union, Any, AnyStr, Optional, Collection
import sabnzbd
import sabnzbd.getipaddress

View File

@@ -29,7 +29,7 @@ import io
import shutil
import functools
import rarfile
from typing import BinaryIO, Optional, Any, Union, Callable
from typing import BinaryIO, Optional, Any, Union
import sabnzbd
from sabnzbd.encoding import correct_unknown_encoding, ubtou

View File

@@ -26,7 +26,7 @@ import time
import logging
import ssl
import sabctools
from typing import Optional, Tuple, Union
from typing import Optional, Union
import sabnzbd
import sabnzbd.cfg

View File

@@ -29,7 +29,7 @@ from typing import Optional
from sabnzbd.constants import MEBI
from sabnzbd.encoding import correct_unknown_encoding
from sabnzbd.filesystem import get_basename, get_ext
from sabnzbd.filesystem import get_basename
PROBABLY_PAR2_RE = re.compile(r"(.*)\.vol(\d*)[+\-](\d*)\.par2", re.I)
SCAN_LIMIT = 10 * MEBI

View File

@@ -19,9 +19,7 @@
"""
sabnzbd.utils.rarvolinfo - Find out volume number and/or original extension of a rar file. Useful with obfuscated files
"""
import logging
import os
import rarfile

View File

@@ -27,7 +27,6 @@ from selenium import webdriver
from selenium.webdriver.chrome.options import Options as ChromeOptions
from warnings import warn
from sabnzbd.constants import DEF_INI_FILE
from tests.testhelper import *