Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
from __future__ import annotations from collections.abc import Generator from collections.abc import Iterable from typing import NamedTuple from typing import Protocol from yaml.nodes import MappingNode from yaml.nodes import Node from yaml.nodes import ScalarNode from yaml.nodes import SequenceNode class _Matcher(Protocol): def match(self, n: Node) -> Generator[Node]: ... class MappingKey(NamedTuple): k: str def match(self, n: Node) -> Generator[Node]: if isinstance(n, MappingNode): for k, _ in n.value: if k.value == self.k: yield k class MappingValue(NamedTuple): k: str def match(self, n: Node) -> Generator[Node]: if isinstance(n, MappingNode): for k, v in n.value: if k.value == self.k: yield v class SequenceItem(NamedTuple): def match(self, n: Node) -> Generator[Node]: if isinstance(n, SequenceNode): yield from n.value def _match(gen: Iterable[Node], m: _Matcher) -> Iterable[Node]: return (n for src in gen for n in m.match(src)) def match(n: Node, matcher: tuple[_Matcher, ...]) -> Generator[ScalarNode]: gen: Iterable[Node] = (n,) for m in matcher: gen = _match(gen, m) return (n for n in gen if isinstance(n, ScalarNode))