-
Notifications
You must be signed in to change notification settings - Fork 171
chore: shorten docstrings (ruff w505: doc-line-too-long) #2152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ebfcb99
to
6cf0ddd
Compare
bbe57c7
to
08804ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for taking this on! I think we can ignore the coverage error for now.
I'd be happy to merge this now. Then for every new EEST PR we try to remember the docstring length. Worst case we come back to it in EELS when we do all the code too!
cc @danceratopz for second opinion on whether to merge now or later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for getting on this @felix314159! Looking good so far, but I don't think we're quite finished yet.
First, I noticed a bunch of # noqa: E501
directives applied to docstrings, some of which weren't required anymore, some of which were hiding bad docstrings. This is directly related to this task and it makes sense to get rid as many of these as possible, to stop them proliferating further through the codebase. I did that in 3b91efc
I didn't do any automated reformatting.There are quite a few of them left in tests/unscheduled. If you could remove them and then do your auto-formatting on them that would be amazing π.
Secondly, during this work, I realized that the command shared in this comment wasn't catching all remaining bad formatting, e.g., this docstring line is still > 79:
https://github.com/felix314159/execution-spec-tests/blob/3b91efc0584e31a7a848ecdd1268c2c30e18e8b1/tests/prague/eip7702_set_code_tx/test_set_code_txs.py#L91
So I had a look and it looks like we need to run this command to verify W505:
uv run ruff check --select W505 --config 'lint.pycodestyle.max-doc-length = 79' src tests .github/scripts
I don't know why this isn't equivalent: uv run ruff check --select W505 --line-length 79 src tests .github/scripts/
.
Regarding @spencer-tb's comment:
I'd even suggest adding this as an additional check in tox's
And potentially adding a "ruler" at execution-spec-tests/.vscode/settings.json Lines 16 to 17 in 562fde1
|
Great idea! Let's add it! |
Interesting, and there does not seem to be a simple fix for docformatter that would be able to fix all of the errors that you can see with that command. We might have to use a different tool / build or own to accomplish this. I still get more than 1100 lines that still need fixing, so we should probably automate this some different way. |
ποΈ Description
Edit: Will take some more time
π Related Issues or PRs
N/A.
β Checklist
tox
checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
type(scope):
.mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_from
marker.