Problem
pumpfun tokens trending --limit -1 uses Python negative slicing, returning ~294 items instead of erroring. --limit 0 returns an empty list silently.
Fix
Add min=1 to all five typer.Option definitions for --limit in src/pumpfun_cli/commands/tokens.py:
limit: int = typer.Option(20, "--limit", "-n", min=1, help="...")
There are 5 commands that need this: trending, new, graduating, top, search.
Files to change
src/pumpfun_cli/commands/tokens.py — add min=1 to all 5 --limit options
tests/test_commands/ — add test that --limit 0 or --limit -1 errors
How to test
uv run pytest tests/test_commands/ -v
Problem
pumpfun tokens trending --limit -1uses Python negative slicing, returning ~294 items instead of erroring.--limit 0returns an empty list silently.Fix
Add
min=1to all fivetyper.Optiondefinitions for--limitinsrc/pumpfun_cli/commands/tokens.py:There are 5 commands that need this:
trending,new,graduating,top,search.Files to change
src/pumpfun_cli/commands/tokens.py— addmin=1to all 5--limitoptionstests/test_commands/— add test that--limit 0or--limit -1errorsHow to test