Skip to content

fix(cli): rejeitar intervalo/n negativos e CSV quebrado - #11

Merged
armelingu merged 1 commit into
mainfrom
fix/cli-validation
Aug 14, 2026
Merged

armelingu merged 1 commit into
mainfrom
fix/cli-validation

Conversation

@armelingu

Copy link
Copy Markdown
Owner

Resumo

mm watch -i -1 passava no argparse e crashava em time.sleep(-1). mm history -n -5 virava rows[5:] (o oposto do pedido). Agora -i e -n exigem >= 1. Linhas truncadas ou com percent vazio/NaN no CSV são puladas em vez de derrubar mm history.

Tipo de mudança

  • fix — correção de bug
  • test — adiciona ou melhora testes
  • docs — documentação de usuário

Issues relacionadas

—

Saída

Antes:

ValueError: sleep length must be non-negative
ValueError: could not convert string to float: ''

Depois:

mm watch: error: argument -i/--interval: must be >= 1

mm history renderiza só as linhas válidas.

Checklist

Notas para revisão

Último item da varredura: interface de rede ativa + não cachear IP público None.

watch -i -1 crashava no sleep; history -n -5 fatiava o arquivo ao
contrário. Flags passam a exigir >= 1 e linhas inválidas do CSV
são ignoradas em vez de derrubar o comando.
@armelingu
armelingu merged commit 316fbdf into main Aug 14, 2026
15 checks passed
@armelingu
armelingu deleted the fix/cli-validation branch August 14, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant