Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/doc/en/developer/packaging_sage_library.rst: Mention relint, sage…
Browse files Browse the repository at this point in the history
… --fiximports
  • Loading branch information
Matthias Koeppe committed Jan 29, 2023
1 parent 568c538 commit eef9cd5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ distribution -- which then must be declared as a run-time dependency.
the ``sage:`` prompt. In particular, no Sage library code should import from
:mod:`sage.rings.all`.

To audit the Sage library for such imports, use ``sage --tox -e relint``.
In most cases, the imports can be fixed automatically using the
tool ``sage --fiximports``.

- Replace module-level imports by method-level imports. Note that
this comes with a small runtime overhead, which can become
noticeable if the method is called in tight inner loops.
Expand Down

0 comments on commit eef9cd5

Please sign in to comment.