Skip to content

Commit

Permalink
sagemathgh-38145: docstrings: INPUT formatting
Browse files Browse the repository at this point in the history
    
Separate ` ``x, y`` ` to ` ``x``, ``y`` ` and remove excessive newlines.
    
URL: sagemath#38145
Reported by: gmou3
Reviewer(s): gmou3, Kwankyu Lee
  • Loading branch information
Release Manager committed Jun 7, 2024
2 parents cfb5065 + 3249f5b commit dcc802b
Show file tree
Hide file tree
Showing 743 changed files with 650 additions and 1,386 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=022699b7eb21eccbc8f9d15fe354069f2cf125fc
sha256=1dc7bc34f697b658b026772bb2d3c10875c5fa3be96d2d58a4e1b794f4b6ac3d
sha1=14af118d49c9381989e4ea2409817248d34ebf19
sha256=860c9d730e6bd766be52c304e3fc5bef30e022ba35c0a3eb227c0930255426b0
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
973a7e3600d01aede4d21d94d1ff58e7d1631af1
be566915755fbfad85571c4a82e25404b43d10cb
3 changes: 0 additions & 3 deletions build/pkgs/database_symbolic_data/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ if [ $? -ne 0 ]; then
echo >&2 "Error installing symbolic data."
exit 1
fi



2 changes: 0 additions & 2 deletions build/pkgs/jmol/appletweb/JmolHelp.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<html><head>




<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>JmolHelp</title>

<meta content="J. Gutow" name="author">
Expand Down
4 changes: 0 additions & 4 deletions build/pkgs/sympow/email-exchange.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ work fine on any system that uses 53-bit doubles. On other systems,
it will still work for computations less than 16 or so digits (though
the current version might die on start-up).





NOTES:

1. getline conflicts with a system-wide function name on
Expand Down
1 change: 0 additions & 1 deletion build/sage_bootstrap/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
Provides scripts to manage the packages of Sage-the-distribution,
including SageMath's database of equivalent system packages,
and to download and upload tarballs from/to SageMath servers.
"""


Expand Down
9 changes: 4 additions & 5 deletions build/sage_bootstrap/download/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"""



def make_parser():
"""
The commandline argument parser for sage-download-file
Expand All @@ -46,7 +45,7 @@ def make_parser():
help='one of [DEBUG, INFO, ERROR, WARNING, CRITICAL]')

parser.add_argument(
'--print-fastest-mirror', action='store_true',
'--print-fastest-mirror', action='store_true',
help='Print out the fastest mirror. All other arguments are ignored in that case.')

parser.add_argument(
Expand All @@ -72,7 +71,7 @@ def make_parser():
help="""Where to write the file. If the destination is not specified, a url
will be downloaded and the content written to stdout and a
tarball will be saved under {SAGE_DISTFILES}""".format(SAGE_DISTFILES=SAGE_DISTFILES))

parser.add_argument(
'--no-check-certificate', action='store_true',
help='Do not check SSL certificates for https connections')
Expand Down Expand Up @@ -122,7 +121,7 @@ def format_error(message):
sys.stderr.write(message)
sys.stderr.write(stars)


def run_safe():
try:
run()
Expand All @@ -132,6 +131,6 @@ def run_safe():
finally:
sys.exit(1)


if __name__ == '__main__':
run_safe()
1 change: 0 additions & 1 deletion build/sage_bootstrap/uncompress/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
ARCHIVE_TYPES = [SageTarFile, SageZipFile, SageTarXZFile]



def open_archive(filename):
"""
Automatically detect archive type
Expand Down
1 change: 0 additions & 1 deletion m4/ax_boost_base.m4
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes" ; then
Expand Down
15 changes: 7 additions & 8 deletions pkgs/sage-sws2rst/sage_sws2rst/worksheet2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
r"""
Convert worksheet.html files into ReStructuredText documents
This is called by 'sage -sws2rst'. Can also be used as a commandline script
This is called by 'sage -sws2rst'. Can also be used as a commandline script
(if BeautifulSoup is installed):
``python worksheet2rst.py worksheet.html``
Expand All @@ -17,7 +17,7 @@
- Pablo Angulo Ardoy (2011-02-25): initial version
The content of worksheet.html is split into comments, code, and output
The content of worksheet.html is split into comments, code, and output
(the result of evaluating the code), as follows:
comments
Expand All @@ -28,7 +28,6 @@
}}}
Each kind of text is dealt with separately.
"""

#**************************************************
Expand Down Expand Up @@ -84,7 +83,7 @@ class States(object):

def code_parser(text):
"""
Arguments:
INPUT:
Expand All @@ -95,7 +94,7 @@ def code_parser(text):
- string -- rst text
EXAMPLES (not used for unit test, see
EXAMPLES (not used for unit test, see
http://groups.google.com/group/sage-devel/browse_thread/thread/d82cb049ac102f3a)
: from sage_sws2rst.worksheet2rst import code_parser
Expand Down Expand Up @@ -140,7 +139,7 @@ def worksheet2rst(s, images_dir=''):
- string -- rst text
EXAMPLES (not used for unit test, see
EXAMPLES (not used for unit test, see
http://groups.google.com/group/sage-devel/browse_thread/thread/d82cb049ac102f3a)
: from sage_sws2rst.worksheet2rst import worksheet2rst
Expand All @@ -156,7 +155,7 @@ def worksheet2rst(s, images_dir=''):
ls = []
for line in s.splitlines():
regex, next_state= transitions[state]
m = regex.match(line)
m = regex.match(line)
if m:
if state == States.COMMENT:
last_cell_id = m.group(1)
Expand Down Expand Up @@ -192,7 +191,7 @@ def worksheet2rst(s, images_dir=''):
return '\n'.join(result)

if __name__=='__main__':
if len(sys.argv)>1:
if len(sys.argv)>1:
fichero = codecs.open(sys.argv[1], mode='r', encoding='utf-8')
text = fichero.read()
fichero.close()
Expand Down
1 change: 0 additions & 1 deletion pkgs/sagemath-objects/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ include sage/rings/integer_fake.*
graft sage/libs/gmp



## What we do not want:
# sage/misc/latex -- this should really go to another package

Expand Down
1 change: 0 additions & 1 deletion src/bin/sage-fixdoctests
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env sage-python

"""
Given the output of doctest and a file, adjust the doctests so they won't fail.

Expand Down
1 change: 0 additions & 1 deletion src/bin/sage-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ EXAMPLES:
* Export a legacy Sage notebook as a Jupyter notebook:
sage --notebook=export --ipynb=Output.ipynb admin:10
"""

notebook_launcher = {
Expand Down
1 change: 0 additions & 1 deletion src/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# pyright: strict

"""Configuration and fixtures for pytest.
This file configures pytest and provides some global fixtures.
Expand Down
4 changes: 0 additions & 4 deletions src/doc/common/static/custom-jupyter-sphinx.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,3 @@ body[data-theme="dark"] {
}
}
}




1 change: 0 additions & 1 deletion src/doc/de/thematische_anleitungen/sage_gymnasium.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,6 @@ benutzen wir ``divisors()``::
[1, 2, 3, 4, 6, 12, 13, 26, 39, 52, 78, 156]



Weiterführende Links und Literatur
==================================

Expand Down
1 change: 0 additions & 1 deletion src/doc/de/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ Hilfe, und ``V.coordinates??`` um den Quelltext der Funktion zu
sehen.



Integriertes Hilfesystem
========================

Expand Down
1 change: 0 additions & 1 deletion src/doc/de/tutorial/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ zur Installation von Sage auf Ihrem Computer zu erhalten.
Hier geben wir nur ein paar Kommentare ab.



#. Die herunterladbare Sage-Datei wurde nach der *batteries included*
Philosophie zusammengestellt. In anderen Worten, obwohl Sage
Python, IPython, PARI, GAP, Singular, Maxima, NTL, GMP und so
Expand Down
1 change: 0 additions & 1 deletion src/doc/de/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ modelliert,
m_2 x_2''+ k_2 (x_2-x_1) = 0,
wobei :math:`m_{i}` die Masse des Objekts *i*, :math:`x_{i}` die
Verschiebung des Gleichgewichts der Masse *i* und :math:`k_{i}` die
Federkonstante der Feder *i* ist.
Expand Down
1 change: 0 additions & 1 deletion src/doc/en/constructions/linear_codes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ The LFSR sequence is then
\end{array}
The sequence of :math:`0,1`'s is periodic with period
:math:`P=2^4-1=15` and satisfies Golomb's three randomness
conditions. However, this sequence of period 15 can be "cracked"
Expand Down
1 change: 0 additions & 1 deletion src/doc/en/developer/coding_in_other.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ convert output from PARI to Sage objects:
return F, B
.. _section-gap:

GAP
Expand Down
2 changes: 0 additions & 2 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ pip for use in a separate process, like ``tox``, then this should be
possible.
.. _section-spkg-check:
Self-tests
Expand Down Expand Up @@ -765,7 +764,6 @@ packages add dependencies that happen to be Sage packages, there is a
separate source of instability.
.. _section-spkg-SPKG-txt:
The SPKG.rst file
Expand Down
1 change: 0 additions & 1 deletion src/doc/en/faq/faq-general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ following commands:
$ ./sage --advanced
I want to cite Sage in a publication, how do I do it?
"""""""""""""""""""""""""""""""""""""""""""""""""""""

Expand Down
1 change: 0 additions & 1 deletion src/doc/en/reference/plot3d/threejs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ An :meth:`~sage.plot.animate.Animation.interactive` animation::
:file: threejs_examples/animation.html



.. RAW:: html

<script>
Expand Down
1 change: 0 additions & 1 deletion src/doc/en/thematic_tutorials/coercion_and_categories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ elements. But some old stuff in Sage doesn't use it. **Volunteers for
refactoring are welcome!**



The parent
----------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ consider the cubic equation
x^3 + \sqrt{2} x + 5 = 0.
In Sage, we can create this equation, and find an exact symbolic
solution.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ has maximal order with :math:`\ZZ`-basis
1, \frac{1}{2} a^{2} + \frac{1}{2} a, a^{2}.
::

sage: K.<a> = NumberField(x^4 + 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ Check it out\-\-\-we started with an integer\-lattice polytope and dualized
to a rational\-lattice polytope. Let's look at that.




::

sage: P1dual.plot()
Expand Down Expand Up @@ -191,7 +189,6 @@ However, if a polytope is *not* in `\ZZ`, for example if it's in `\QQ` or
Keep all of this in mind as you take polar duals.



Polytope Constructions
""""""""""""""""""""""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ following C code.
} double_sparse_matrix;
double_sparse_matrix * initialize_matrix(int nrows, int ncols)
{
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ this with the solver we wrote in the section on f2py.
row_below=MPI.COMM_WORLD.Recv(1)
if rank >0 and rank < size-1:
row_below.shape=(1,num_points)
row_above.shape=(1,num_points)
Expand Down Expand Up @@ -109,7 +108,6 @@ this with the solver we wrote in the section on f2py.
num_iter=num_iter+1
recvbuf=MPI.COMM_WORLD.Gather(my_grid,root)
if rank==0:
sol=numpy.array(recvbuf)
Expand All @@ -126,5 +124,5 @@ takes more time than just doing the iteration. However, on a
takes only 6 seconds while the serial version we wrote earlier
takes 20 seconds.

Exercise: Rewrite the above using f2py, so that each process
Exercise: Rewrite the above using f2py, so that each process
compiles a fortran function and uses that, how fast can you get this?
1 change: 0 additions & 1 deletion src/doc/en/thematic_tutorials/sandpile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ Alternatives::
[{1: 2, 2: 1, 3: 1}, {1: 2, 2: 2, 3: 3}]



Since vertex 3 has become unstable after firing vertex 1, it can be fired,
which causes vertex 2 to become unstable, etc. Repeated firings eventually
lead to a stable configuration. The last line of the Sage code, above, is a
Expand Down
Loading

0 comments on commit dcc802b

Please sign in to comment.