Coverage for src/galaxy_beep_frame/exception/converter/node_count.py: 100%
4 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-31 04:18 +0200
« prev ^ index » next coverage.py v7.15.2, created at 2026-08-31 04:18 +0200
1"""NodeCountError class."""
3from .lexer import LexerError
6class NodeCountError(LexerError):
7 """Node count is wrong."""
9 def __init__(
10 self, count: int, name: str, expected: int = 1
11 ) -> None:
12 """
13 Error initialization.
15 Parameters
16 ----------
17 count: int
18 Counted nodes.
19 name: str
20 Name of the relationship.
21 expected: int
22 Expected node count.
24 """
26 super().__init__(
27 f"There must be {expected} {name} nodes. Found {count}."
28 )