Merge pull request #230 from BryanTegomoh/fix/days-alias-backcompat
fix(cli): restore --days alias compatibility
This commit is contained in:
@@ -165,7 +165,14 @@ def build_parser() -> argparse.ArgumentParser:
|
|||||||
parser.add_argument("--tiktok-hashtags", help="Comma-separated TikTok hashtags without # (e.g., tella,screenrecording)")
|
parser.add_argument("--tiktok-hashtags", help="Comma-separated TikTok hashtags without # (e.g., tella,screenrecording)")
|
||||||
parser.add_argument("--tiktok-creators", help="Comma-separated TikTok creator handles (e.g., TellaHQ,taborplace)")
|
parser.add_argument("--tiktok-creators", help="Comma-separated TikTok creator handles (e.g., TellaHQ,taborplace)")
|
||||||
parser.add_argument("--ig-creators", help="Comma-separated Instagram creator handles (e.g., tella.tv,laborstories)")
|
parser.add_argument("--ig-creators", help="Comma-separated Instagram creator handles (e.g., tella.tv,laborstories)")
|
||||||
parser.add_argument("--lookback-days", type=int, default=30, help="Number of days to look back for research (default: 30, watchlist uses 90)")
|
parser.add_argument(
|
||||||
|
"--days",
|
||||||
|
"--lookback-days",
|
||||||
|
dest="lookback_days",
|
||||||
|
type=int,
|
||||||
|
default=30,
|
||||||
|
help="Number of days to look back for research (default: 30, watchlist uses 90)",
|
||||||
|
)
|
||||||
parser.add_argument("--auto-resolve", action="store_true",
|
parser.add_argument("--auto-resolve", action="store_true",
|
||||||
help="Use web search to discover subreddits/handles before planning (for platforms without WebSearch)")
|
help="Use web search to discover subreddits/handles before planning (for platforms without WebSearch)")
|
||||||
parser.add_argument("--github-user", help="GitHub username for person-mode search (e.g., steipete)")
|
parser.add_argument("--github-user", help="GitHub username for person-mode search (e.g., steipete)")
|
||||||
|
|||||||
@@ -77,6 +77,13 @@ class CliV3Tests(unittest.TestCase):
|
|||||||
with self.assertRaises(SystemExit):
|
with self.assertRaises(SystemExit):
|
||||||
cli.parse_search_flag(" , ")
|
cli.parse_search_flag(" , ")
|
||||||
|
|
||||||
|
def test_build_parser_accepts_days_alias_and_preserves_topic_tokens(self):
|
||||||
|
parser = cli.build_parser()
|
||||||
|
args, extra = parser.parse_known_args(["--days", "7", "biosecurity", "ai", "agents"])
|
||||||
|
self.assertEqual(7, args.lookback_days)
|
||||||
|
self.assertEqual(["biosecurity", "ai", "agents"], args.topic)
|
||||||
|
self.assertEqual([], extra)
|
||||||
|
|
||||||
def test_ensure_supported_python_rejects_old_interpreter_with_actionable_error(self):
|
def test_ensure_supported_python_rejects_old_interpreter_with_actionable_error(self):
|
||||||
stderr = io.StringIO()
|
stderr = io.StringIO()
|
||||||
with redirect_stderr(stderr):
|
with redirect_stderr(stderr):
|
||||||
|
|||||||
Reference in New Issue
Block a user