Open
Description
Within the numpy codebase we aim to keep the maximum line length at 88 (#27320). We will enforce the ruff E501 rule for the codebase step by step:
List of files to be handled:
- test*.py
- benchmarks/*.py
- benchmarks/benchmarks/bench_linalg.py
- numpy/_build_utils/*py
- numpy/init.py
- numpy/_core/**
- numpy/_core/tests/**
- numpy/core/**
- numpy/_typing/*py
- numpy/lib/*py
- numpy/lib/tests/*py
- numpy/linalg/*py
- numpy/linalg/tests/*py
- numpy/linalg/tests/test_linalg.py
- numpy/ma/*py
- numpy/ma/tests/*py
- numpy/polynomial/*py
- numpy/tests/*py
- numpy/random/*py
- numpy/f2py/*py"
- numpy*pyi"
Procedure:
- Select a couple of files to fix (for example all python files in numpy/random)
- Update
ruff.toml
to enable ruff E501 - Change python files to have maximum line length 88
- If some formatting really is better with longer lines, use
# noqa: E501
to make an exception