You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use ruff format instead of black pre-commit hook? #15757
The ruff formatter is in "production-ready beta" now, and it's supposed to be a 99.9% drop in replacement for black. Astropy currently uses ruff for linting and black for formatting with pre-commit hooks, moving to ruff should help removing one hook and also making the codestyle tox step run quickly. I ran the ruff formatter on astropy and it made minimal changes (~35 places).
Describe the desired outcome
Remove black from pre-commit-hooks and add ruff format.
Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.
GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.
If you feel that this issue has not been responded to in a timely manner, please send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].
For the record I am very much in favor of migrating to ruff to replace black.
As noted, APE-20 will need modifications. It is too bad we didn't appreciate at the time that APE-20 was about "black formatting" (i.e. a style of formatting) instead of an implementation of black formatting using the black package.
Activity
github-actions commentedon Dec 17, 2023
Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.
GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.
If you feel that this issue has not been responded to in a timely manner, please send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].
neutrinoceros commentedon Dec 18, 2023
Hi @MridulS, a migration plan was previously pitched by @eerovaher in November's telecon (see the running notes https://docs.google.com/document/d/15JSFh3OMF9Iz6ov3q_xxGO_BL8hRnuse4IMUrqEIvcg/edit?pli=1#heading=h.h1eip4swqth0)
taldcroft commentedon Dec 19, 2023
For the record I am very much in favor of migrating to ruff to replace black.
As noted, APE-20 will need modifications. It is too bad we didn't appreciate at the time that APE-20 was about "black formatting" (i.e. a style of formatting) instead of an implementation of black formatting using the
blackpackage.neutrinoceros commentedon Dec 19, 2023
@pllim why did you apply the "upstream fix required" label ?
pllim commentedon Dec 19, 2023
Because in #15757 (comment) "As noted, APE-20 will need modifications."
neutrinoceros commentedon Dec 19, 2023
Oh I see, I didn't get that APEs were "upstream", but that makes sense !
pllim commentedon Dec 19, 2023
Upstream in a sense that the changes to APE has to be proposed, debated, accepted, and merged first before we can proceed here. 😅
taldcroft commentedon Dec 19, 2023
astropy/astropy-APEs#90
pllim commentedon Feb 26, 2024
Weird that #16029 didn't auto close this.