Skip to content

STY: ignore all existing violations to rule PLR0917 and upgrade ruff to 0.16.x - #20194

Merged
neutrinoceros merged 6 commits into
astropy:mainfrom
neutrinoceros:sty/plr0917
Oct 15, 2026
Merged

neutrinoceros merged 6 commits into
astropy:mainfrom
neutrinoceros:sty/plr0917

Conversation

@neutrinoceros

Copy link
Copy Markdown
Contributor

Description

Close #20113

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@nstarman

nstarman commented Sep 7, 2026

Copy link
Copy Markdown
Member

@neutrinoceros

But the idea discussed was to enable it in the future #20113 (comment). Maybe "legacy" or "pre-existing" API would be a better term?

I think "legacy" over "historical" may be a good change to help get this PR in?

@neutrinoceros

neutrinoceros commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

I intentionally avoided the term "legacy" so as not to imply or suggest all these APIs are meant to be replaced, but I'll settle down for it or any other alternate wording that @saimn can get behind.

@nstarman

nstarman commented Oct 6, 2026

Copy link
Copy Markdown
Member

Ping @saimn :)

@saimn

saimn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Well it's not about the wording. For what concerns io.fits (but it isn't much different for most subpackages) there is no legacy or historical API, just the current API, that is what it is and will remain like that. And we don't add new API so often. So this comment is wrong (legacy or historical API would suggest that there is a new one), annoying, and useless.

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

And we don't add new API so often.

the frequency doesn't really matter in my opinion. What does matter is wether we have a consensus that new APIs should not accept a large number of positional arguments. Do we have it ?

@saimn

saimn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Yes it matters. You can't enforce a rule, pollute the code, and declare everything as legacy for a case that almost never happens.

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Alright. Putting aside the fact that I explicitly rejected declaring anything "legacy" for the sake of this PR, I'm going to opt-out of this rule for io.fits, hoping that you can lift your objection then.
I also invite anyone interested in avoiding this sort of friction in the future to weigh in on #20519

@taldcroft

Copy link
Copy Markdown
Member

Hearing the point from @saimn about the APIs, I'm now strongly in favor of removing any additional text in the ignore comment like "historical" or "legacy" or "pre-existing". The API is what it is, and that text is only adding noise.

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

removed

@taldcroft taldcroft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good for table, time, io.ascii.

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Pressure is building as ruff 0.17.0 is now out and this change is still needed to upgrade to 0.16.x
I genuinely think @saimn's requests for changes were addressed so, with 3 approvals, I'm considering merging this next week.

@neutrinoceros
neutrinoceros merged commit 4834673 into astropy:main Oct 15, 2026
43 of 44 checks passed
@neutrinoceros
neutrinoceros deleted the sty/plr0917 branch October 15, 2026 15:32
@github-project-automation github-project-automation Bot moved this from Review in progress to Done in Cosmology, the Expansion Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

MNT: upgrading ruff to 0.16.x

9 participants