diff --git a/PFERD/config.py b/PFERD/config.py index 4bfada7..1462d82 100644 --- a/PFERD/config.py +++ b/PFERD/config.py @@ -170,8 +170,7 @@ class Config: def dump_to_stdout(self) -> None: self._parser.write(sys.stdout) - # TODO Rename to "crawl_sections" - def crawler_sections(self) -> List[Tuple[str, SectionProxy]]: + def crawl_sections(self) -> List[Tuple[str, SectionProxy]]: result = [] for name, proxy in self._parser.items(): if name.startswith("crawl:"): @@ -179,8 +178,7 @@ class Config: return result - # TODO Rename to "auth_sections" - def authenticator_sections(self) -> List[Tuple[str, SectionProxy]]: + def auth_sections(self) -> List[Tuple[str, SectionProxy]]: result = [] for name, proxy in self._parser.items(): if name.startswith("auth:"): diff --git a/PFERD/pferd.py b/PFERD/pferd.py index 434407d..df48bd2 100644 --- a/PFERD/pferd.py +++ b/PFERD/pferd.py @@ -28,7 +28,7 @@ class Pferd: def _find_crawlers_to_run(self, config: Config, cli_crawlers: Optional[List[str]]) -> List[str]: log.explain_topic("Deciding which crawlers to run") - crawl_sections = [name for name, _ in config.crawler_sections()] + crawl_sections = [name for name, _ in config.crawl_sections()] if cli_crawlers is None: log.explain("No crawlers specified on CLI") @@ -63,7 +63,7 @@ class Pferd: return crawlers_to_run def _load_authenticators(self) -> None: - for name, section in self._config.authenticator_sections(): + for name, section in self._config.auth_sections(): log.print(f"[bold bright_cyan]Loading[/] {escape(name)}") auth_type = section.get("type") authenticator_constructor = AUTHENTICATORS.get(auth_type) @@ -77,7 +77,7 @@ class Pferd: # Cookie sharing kit_ilias_web_paths: Dict[Authenticator, List[Path]] = {} - for name, section in self._config.crawler_sections(): + for name, section in self._config.crawl_sections(): log.print(f"[bold bright_cyan]Loading[/] {escape(name)}") crawl_type = section.get("type")