Closed john-science closed 6 months ago
There are a ton of updates in here that increase line length. Can you undo all those changes? That creates more unnecessary work for us (it gets reviewed in this PR, then again in the 100 char line length limit PR).
This is true if the plan is to move the line length bar again. Which I don't really understand a motivation for. I can get trimming it to 120, but 100? Or 88? It seems unnecessary?
This is true if the plan is to move the line length bar again. Which I don't really understand a motivation for. I can get trimming it to 120, but 100? Or 88? It seems unnecessary?
Well, two weeks ago, we had lines that were >200 characters long. That is a bit too much, even for me.
I tend to work at 120. Though... 88 is by a WIDE margin the most common. For instance, that is the default in both black
and ruff
.
To be clear, I wasn't really interested in lowering the bar again. But I am by FAR in the minority here. I just happen to find that scientific code has long lines of math that mean stringent line-length limits make code harder to read and parse. Perhaps the "88 character limit" comes from website development and other work of that sort, where no individual line has a LOT of math to it.
I can approve this once my review is responded to.
Looks like I have an outstanding british v american english spelling thing, and question for my review. John partially answered my questions about the 100 vs 120 char issue, but it seems the inconsistency is broader than the question that was answered (that related to impl tags).
What is the change?
Using
ruff
to enforce a maximum line length of 120. Becauseruff
is doing the enforcing, GitHub CI will catch and enforce this new rule in the future.This was mostly an automated process, though I did have to touch the
pyproject.toml
by hand, and I touched the release notes.Why is the change being made?
This is purely for code quality and readability; lines that are longer than 120 characters are pretty hard to read on a
git diff
or even the "GitHub Diff" UI in PRs. They also add to a lot of clutter and confusion in most IDEs.We could also move the bar to 100 characters, which would be more standard. But...
ruff
tells me that would make changes to 768 files, and that feels like too big a pill to swallow.Checklist
doc/release/0.X.rst
) are up-to-date with any important changes.doc
folder.pyproject.toml
.