Skip to content

Integrate Ruff docstring linting for Arm public APIs#19934

Merged
Sebastian-Larsson merged 2 commits into
pytorch:mainfrom
Sebastian-Larsson:ruff_docs
Jun 26, 2026
Merged

Integrate Ruff docstring linting for Arm public APIs#19934
Sebastian-Larsson merged 2 commits into
pytorch:mainfrom
Sebastian-Larsson:ruff_docs

Conversation

@Sebastian-Larsson

@Sebastian-Larsson Sebastian-Larsson commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Add a RUFF_DOCS lintrunner target scoped to Arm public API files.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @robell @rascani

@Sebastian-Larsson Sebastian-Larsson added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate labels Jun 2, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

🔗 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 Failures

As of commit 29cfa49 with merge base a8cfb75 (image):

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 2, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Jun 2, 2026
@zingo zingo added the help wanted Extra attention is needed label Jun 2, 2026
@zingo

zingo commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Hi @digantdesai adding Help wanted on this as it would be good to double check this!

Comment thread requirements-dev.txt
certifi # Imported by resolve_buck.py.
lintrunner==0.12.7
lintrunner-adapters==0.14.0
ruff==0.15.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, TIL!

Comment thread .lintrunner.toml

[[linter]]
code = 'RUFF_DOCS'
include_patterns = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious how bad things would get if I were to run this ET wide? 😅

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create an issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an issue for this as well as docformatter to grow beyond arm?

Comment thread .lintrunner.toml
]

[[linter]]
code = 'RUFF_DOCS'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also want to make sure if this collides with whatever we use internally, let me run it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, let me know how it goes

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@digantdesai how did it go?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@digantdesai any update?

Comment thread pyproject.toml
blank = true

[tool.ruff.lint]
select = ["D"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to expand this in the future?

@digantdesai digantdesai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@Sebastian-Larsson Sebastian-Larsson merged commit e5f5853 into pytorch:main Jun 26, 2026
504 of 516 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. help wanted Extra attention is needed module: arm Issues related to arm backend partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants