Source code for registrar.route.path

"""Module holding route classes dealing with POSIX paths
"""

from typing import List, Optional

from ..abc import Route
from ..config import SourceConfig
from ..source import Source, get_source


[docs]class PathRoute(Route[str]): """Route handler that manages the registration of values interpreted as file paths """
[docs] def parse(self, raw: str) -> str: return raw
[docs] def get_source( self, source_cfgs: List[SourceConfig], item: str ) -> Optional[Source]: return get_source(source_cfgs, [item])