Run tests with pytest python
Stop at first failure, verbose, short traceback
pytest -x -v --tb=short tests/
more python
all 15 commands →
Check syntax without running
python3 -m py_compile script.py && echo OK
Format code with black
black --check --diff . && black .
Lint with ruff
ruff check . --fix
Type check with mypy
mypy --strict --ignore-missing-imports src/
Inspect object attributes
python3 -c "import json; print([x for x in dir(json) if not x.startswith('_')])"