mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Type hinting hscommon & cleanup
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
from pathlib import Path
|
||||
import re
|
||||
from typing import Callable, Dict, Union
|
||||
|
||||
from hscommon.build import read_changelog_file, filereplace
|
||||
from sphinx.cmd.build import build_main as sphinx_build
|
||||
@@ -18,7 +19,7 @@ CHANGELOG_FORMAT = """
|
||||
"""
|
||||
|
||||
|
||||
def tixgen(tixurl):
|
||||
def tixgen(tixurl: str) -> Callable[[str], str]:
|
||||
"""This is a filter *generator*. tixurl is a url pattern for the tix with a {0} placeholder
|
||||
for the tix #
|
||||
"""
|
||||
@@ -29,14 +30,14 @@ def tixgen(tixurl):
|
||||
|
||||
|
||||
def gen(
|
||||
basepath,
|
||||
destpath,
|
||||
changelogpath,
|
||||
tixurl,
|
||||
confrepl=None,
|
||||
confpath=None,
|
||||
changelogtmpl=None,
|
||||
):
|
||||
basepath: Path,
|
||||
destpath: Path,
|
||||
changelogpath: Path,
|
||||
tixurl: str,
|
||||
confrepl: Union[Dict[str, str], None] = None,
|
||||
confpath: Union[Path, None] = None,
|
||||
changelogtmpl: Union[Path, None] = None,
|
||||
) -> None:
|
||||
"""Generate sphinx docs with all bells and whistles.
|
||||
|
||||
basepath: The base sphinx source path.
|
||||
|
||||
Reference in New Issue
Block a user