Removes support for Python 3.8 and lower from the code base

This commit is contained in:
Trenton Holmes
2023-09-09 09:08:55 -07:00
committed by Trenton H
parent 5301021da9
commit 34b80a4d8e
34 changed files with 195 additions and 337 deletions

View File

@@ -8,7 +8,6 @@ from threading import Event
from time import monotonic
from time import sleep
from typing import Final
from typing import Set
from django.conf import settings
from django.core.management.base import BaseCommand
@@ -32,7 +31,7 @@ except ImportError: # pragma: nocover
logger = logging.getLogger("paperless.management.consumer")
def _tags_from_path(filepath) -> Set[Tag]:
def _tags_from_path(filepath) -> set[Tag]:
"""
Walk up the directory tree from filepath to CONSUMPTION_DIR
and get or create Tag IDs for every directory.

View File

@@ -5,8 +5,6 @@ import shutil
import tempfile
import time
from pathlib import Path
from typing import List
from typing import Set
import tqdm
from django.conf import settings
@@ -138,8 +136,8 @@ class Command(BaseCommand):
BaseCommand.__init__(self, *args, **kwargs)
self.target: Path = None
self.split_manifest = False
self.files_in_export_dir: Set[Path] = set()
self.exported_files: List[Path] = []
self.files_in_export_dir: set[Path] = set()
self.exported_files: list[Path] = []
self.compare_checksums = False
self.use_filename_format = False
self.use_folder_prefix = False