Coverage for src/lilbee/cli/commands/crawl_login.py: 100%
11 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-11-06 08:17 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-11-06 08:17 +0000
1"""The login `lilbee add` sends: one host per command, and the settings name their host."""
3from __future__ import annotations
5from lilbee.cli import theme
6from lilbee.crawler.models import CrawlLogin
7from lilbee.crawler.stored_login import STORED_LOGIN_NOT_SENT, stored_login_withheld
8from lilbee.crawler.stored_login import crawl_login as resolve_crawl_login
9from lilbee.runtime.console import PlainConsole
12def crawl_login(urls: list[str], typed: CrawlLogin) -> CrawlLogin:
13 """The login for the crawl of *urls*; a stored login that is not sent gets a note."""
14 login = resolve_crawl_login(urls, typed)
15 if stored_login_withheld(urls):
16 PlainConsole(stderr=True).print(STORED_LOGIN_NOT_SENT, style=theme.WARNING)
17 return login