Integrate Ruff docstring linting for Arm public APIs#19934
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19934
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 3 Unrelated Failures, 5 Unclassified FailuresAs of commit 29cfa49 with merge base a8cfb75 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @digantdesai adding Help wanted on this as it would be good to double check this! |
| certifi # Imported by resolve_buck.py. | ||
| lintrunner==0.12.7 | ||
| lintrunner-adapters==0.14.0 | ||
| ruff==0.15.4 |
|
|
||
| [[linter]] | ||
| code = 'RUFF_DOCS' | ||
| include_patterns = [ |
There was a problem hiding this comment.
curious how bad things would get if I were to run this ET wide? 😅
There was a problem hiding this comment.
It would probably result in quite a few errors and warnings 😅 But enabling it one directory at a time shouldn't be too heavy work
There was a problem hiding this comment.
Create an issue for this as well as docformatter to grow beyond arm?
| ] | ||
|
|
||
| [[linter]] | ||
| code = 'RUFF_DOCS' |
There was a problem hiding this comment.
I also want to make sure if this collides with whatever we use internally, let me run it.
There was a problem hiding this comment.
Alright, let me know how it goes
0b29ceb to
9f1268c
Compare
| blank = true | ||
|
|
||
| [tool.ruff.lint] | ||
| select = ["D"] |
There was a problem hiding this comment.
Are you planning to expand this in the future?
digantdesai
left a comment
There was a problem hiding this comment.
Apologies for the delay.
Add a RUFF_DOCS lintrunner target scoped to Arm public API files. Configure Ruff to run Google-style pydocstyle rules while ignoring module docstring requirements and docformatter-incompatible rules. Signed-off-by: Sebastian Larsson <sebastian.larsson@arm.com> Change-Id: I4285ff88f37997422391c4950a714934f58e2ad4
Signed-off-by: Sebastian Larsson <sebastian.larsson@arm.com> Change-Id: I05c39f22996ac6ac48150240f27793dbefcebb8c
47eb84c to
29cfa49
Compare
Add a RUFF_DOCS lintrunner target scoped to Arm public API files.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @robell @rascani