refactor: remove redundant modules
This commit is contained in:
parent
2b1a875a08
commit
93fdf8c789
1 changed files with 0 additions and 16 deletions
|
|
@ -30,13 +30,10 @@ __copyright__ = '2023 - Victory Karma IT'
|
||||||
__license__ = 'DL-DE-BY-2.0'
|
__license__ = 'DL-DE-BY-2.0'
|
||||||
|
|
||||||
from dataclasses import dataclass, asdict
|
from dataclasses import dataclass, asdict
|
||||||
from hashlib import sha256
|
|
||||||
import json
|
import json
|
||||||
from mimetypes import guess_extension
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Optional, ByteString, Dict, Tuple, List
|
from typing import Any, Optional, ByteString, Dict, Tuple, List
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from uuid import uuid4
|
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
from sphinx.application import Sphinx
|
from sphinx.application import Sphinx
|
||||||
|
|
@ -55,19 +52,6 @@ from sphinxcontrib.confluencebuilder.rest import Rest as _Rest
|
||||||
logger = logging.getLogger(__name__)
|
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
|
@dataclass
|
||||||
class PageMeta:
|
class PageMeta:
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue