Repository navigation
Remove ruff-enforced style rules and fix stale references in developer guidelines - #1885
Merged
mstimberg merged 5 commits intoOct 9, 2026
Merged
Conversation
The list of PEP-8 rules (indentation, spaces around operators and keyword arguments, backslash continuations) is applied automatically by `ruff format`, which the guide already names as the reference.
The PDF on briansimulator.org returns 404. Link to the published article instead and use its exact title.
help.github.com/articles/using-pull-requests now only redirects to docs.github.com.
The numpy.testing.utils module was removed in NumPy 1.25, and numpy.testing has no `array_equal` function (numpy.array_equal returns a bool instead of raising): refer to numpy.testing.assert_array_equal and import from numpy.testing, as the test suite does. assert_array_equal does not compare dtypes by default, so do not claim that it compares types.
The doctest link pointed to the Python 2 documentation, and the IPython pretty printer page on ipython.org returns 404; link to the current Python 3 and IPython (Read the Docs) pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1829.
This PR implements the scope that I proposed in #1829 (comment) (items A to C) and also fixes a few stale references that I found while re-checking the pages against master. It does not restructure the guidelines and does not add a
CONTRIBUTING.mdor templates (see #1830).style.rstruff format, which the page already names as the tool that enforces the code style, applies all of them; I checked this with ruff 0.14.2 (the version pinned in.pre-commit-config.yaml) and the repository'spyproject.toml. Apart from the link below, the rest of the page, including the import conventions, is unchanged.workflow.rsthttps://help.github.com/articles/using-pull-requestsis replaced byhttps://docs.github.com/en/pull-requests(the old URL now only redirects).testing.rstnumpy.testing.utilswas removed in NumPy 1.25, andnumpy.testinghas noarray_equalfunction. The text now refers tonumpy.testing.assert_array_equal, and the two examples importassert_equalfromnumpy.testing, as the test suite does. I also removed "types" from "comparing types, shapes and content", sinceassert_array_equalcompares dtypes only withstrict=True.representation.rstThe
code_styleanchor is kept, since the release notes refer to it.Checks:
rstcheckreports no issues on the four files (forrepresentation.rst, with Sphinx'sdoctestdirective ignored, since rstcheck does not recognise it).sphinx-build -b htmlsucceeds on master and on this branch with the same set of warnings, and the new NumPy references resolve through intersphinx.