From 93fdf8c7894e037c74a98c77e911866c20d4869e Mon Sep 17 00:00:00 2001 From: "Rodweil, Theodor" Date: Mon, 7 Aug 2023 02:17:23 +0200 Subject: [PATCH] refactor: remove redundant modules --- src/xconfluencebuilder/__init__.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/xconfluencebuilder/__init__.py b/src/xconfluencebuilder/__init__.py index c503149..f4efc0c 100644 --- a/src/xconfluencebuilder/__init__.py +++ b/src/xconfluencebuilder/__init__.py @@ -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: """