Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 6, 2024
1 parent aa877c7 commit 4f735b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/doc/en/developer/coding_in_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ support the command ``latex``.
illustrates LaTeX generation for your object.

#. You can use any macros included in ``amsmath``, ``amssymb``, or
``amsfonts``, or the ones defined in
:sage_root:`doc/commontex/macros.tex`.
``amsfonts``, or the ones defined in :mod:`sage.misc.latex_macros`.

An example template for a ``_latex_`` method follows. Note that the
``.. skip`` line should not be included in your code; it is here to
Expand Down Expand Up @@ -161,7 +160,7 @@ Print representation
====================

The standard Python printing method is ``__repr__(self)``. In Sage,
that is for objects that derive from ``SageObject`` (which is
that is for objects that derive from :class:`SageObject` (which is
everything in Sage), instead define ``_repr_(self)``. This is
preferable because if you only define ``_repr_(self)`` and not
``__repr__(self)``, then users can rename your object to print however
Expand Down Expand Up @@ -646,17 +645,17 @@ When importing from other Python libraries that do not provide sufficient typing
information, it is possible to augment the library's typing information for
the purposes of typechecking the Sage library:

- Create typestub files and place them in the directory :sage_root:`src/typings`.
- Create typestub files and place them in the directory :file:`SAGE_ROOT/src/typings`.
For example, the distribution **pplpy** provides the top-level package :mod:`ppl`,
which publishes no typing information. We can create a typestub file
:sage_root:`src/typings/ppl.pyi` or :sage_root:`src/typings/ppl/__init__.pyi`.
:file:`SAGE_ROOT/src/typings/ppl.pyi` or :file:`SAGE_ROOT/src/typings/ppl/__init__.pyi`.

- When these typestub files are working well, it is preferable from the viewpoint
of the Sage project that they are "upstreamed", i.e., contributed to the
project that maintains the library. If a new version of the upstream library
becomes available that provides the necessary typing information, we can
update the package in the Sage distribution and remove the typestub files again
from :sage_root:`src/typings`.
from :file:`SAGE_ROOT/src/typings`.

- As a fallback, when neither adding typing annotations to source files
nor adding typestub files is welcomed by the upstream project, it is possible
Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/developer/packaging_sage_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ command::

This command does not make any changes to the normal installation of
Sage. The virtual environment is created in a subdirectory of
:sage_root:`pkgs/sagemath-standard/.tox/`. After the command
:file:`SAGE_ROOT/pkgs/sagemath-standard/.tox/`. After the command
finishes, we can start the separate installation of the Sage library
in its virtual environment::

Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/developer/sage_manuals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ order to build a **html** version of this document, type::

sage --docbuild tutorial html

You can now open :sage_root:`local/share/doc/sage/html/en/tutorial/index.html` in
You can now open :file:`SAGE_ROOT/local/share/doc/sage/html/en/tutorial/index.html` in
your web browser.

- Do you want to **add a new file** to the documentation? :ref:`Click here
Expand Down

0 comments on commit 4f735b1

Please sign in to comment.