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