--port is type=int with no range check, and TASKUARY_PORT is read with a bare int():
taskuary --port 70000 -> OverflowError: connect_ex(): port must be 0-65535
TASKUARY_PORT='8080x' taskuary -> ValueError: invalid literal for int()
config.load() runs for every command, so a bad environment variable breaks all of them.
Where: taskuary/cli.py (the --port argument), taskuary/config.py (_env_server).
Done when argparse rejects a port outside 1-65535 with a normal usage error (exit code 2), and a bad TASKUARY_PORT is ignored with a logged warning (or refused with one clear line).
Test - tests/test_config.py: _env_server() with TASKUARY_PORT='abc' does not raise; parsing --port 70000 raises SystemExit with code 2.
Getting started: pip install -e ".[dev]", then python -m pytest -q (offline, a few seconds). UI work: cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.
--portistype=intwith no range check, andTASKUARY_PORTis read with a bareint():config.load()runs for every command, so a bad environment variable breaks all of them.Where:
taskuary/cli.py(the--portargument),taskuary/config.py(_env_server).Done when argparse rejects a port outside 1-65535 with a normal usage error (exit code 2), and a bad
TASKUARY_PORTis ignored with a logged warning (or refused with one clear line).Test -
tests/test_config.py:_env_server()withTASKUARY_PORT='abc'does not raise; parsing--port 70000raisesSystemExitwith code 2.Getting started:
pip install -e ".[dev]", thenpython -m pytest -q(offline, a few seconds). UI work:cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.