Coverage for fpdf2_textindex / constants.py: 100.00%
26 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-24 15:45 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-24 15:45 +0000
1"""Constants."""
3import logging
4from typing import Final, Literal
6LOGGER: logging.Logger = logging.getLogger(__name__.rsplit(".", maxsplit=1)[0])
8# ID prefix/suffix
9ENTRY_ID_PREFIX: Final[Literal["ent"]] = "ent"
10INDEX_ID_PREFIX: Final[Literal["idx"]] = "idx"
11TEXT_ID_SUFFIX: Final[Literal["t"]] = "t" # from index to text
13# Directives
14PATH_DELIMITER: Final[Literal[">"]] = ">"
15REFS_DELIMITER: Final[Literal[";"]] = ";"
17ALSO_MARKER: Final[Literal["+"]] = "+"
18CLOSING_MARKER: Final[Literal["/"]] = "/"
19DISABLE_MARKER: Final[Literal["-"]] = "-"
20EMPHASIS_MARKER: Final[Literal["!"]] = "!"
21ENABLE_MARKER: Final[Literal["+"]] = "+"
22INBOUND_MARKER: Final[Literal["@"]] = "@"
24# Output
25REFERENCES_LIMIT: Final[int] = 10
26"""The limit of references per entry before a warning is shown."""
28CATEGORY_SEPARATOR: Final[Literal[". "]] = ". "
29"""Category separator."""
31FIELD_SEPARATOR: Final[Literal[", "]] = ", "
32"""Field separator."""
34LIST_SEPARATOR: Final[Literal["; "]] = "; "
35"""List separator."""
37PATH_SEPARATOR: Final[Literal[": "]] = ": "
38"""Path separator."""
40RANGE_SEPARATOR: Final[Literal["–"]] = "–" # noqa: RUF001
41"""Range separator."""