refactor: remove redundant modules

This commit is contained in:
Rodweil, Theodor 2023-08-07 02:17:23 +02:00
parent 2b1a875a08
commit 93fdf8c789
No known key found for this signature in database
GPG key ID: F8BC1B0EB1F9CCF5

View file

@ -30,13 +30,10 @@ __copyright__ = '2023 - Victory Karma IT'
__license__ = 'DL-DE-BY-2.0'
from dataclasses import dataclass, asdict
from hashlib import sha256
import json
from mimetypes import guess_extension
from pathlib import Path
from typing import Any, Optional, ByteString, Dict, Tuple, List
from unittest.mock import patch
from uuid import uuid4
from urllib.parse import quote_plus
from sphinx.application import Sphinx
@ -55,19 +52,6 @@ from sphinxcontrib.confluencebuilder.rest import Rest as _Rest
logger = logging.getLogger(__name__)
def generate_checksum_label(content: ByteString, width: int = 16) -> str:
"""Generate a checksum to be used as a confluence content label
:param content: content to create checksum for
:param width: cut off digest after ``width`` characters
"""
hash_ = sha256()
hash_.update(content)
return hash_.hexdigest()[:width]
@dataclass
class PageMeta:
"""