Skip to content

Commit

Permalink
Merge pull request #452 from skirpichev/misc
Browse files Browse the repository at this point in the history
Misc fixes
  • Loading branch information
casevh authored Nov 6, 2023
2 parents 21ccbf7 + 874c95b commit a2d5eb3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
templates_path = ['_templates']

# General information about the project.
project = 'gmpy2'
project = gmpy2.__package__
copyright = '2012 - 2022, Case Van Horsen'

gmpy2_version = packaging.version.parse(gmpy2.__version__)
Expand Down Expand Up @@ -79,3 +79,11 @@
('index', 'gmpy2', 'gmpy2 Documentation',
['Case Van Horsen'], 3)
]

# Python code that is treated like it were put in a testcleanup directive
# for *every* file that is tested, and for every group.
doctest_global_cleanup = """
import gmpy2
gmpy2.set_context(gmpy2.context())
"""
4 changes: 2 additions & 2 deletions src/gmpy2_mpz_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ GMPy_MPZ_Method_IsPower(PyObject *self, PyObject *other)

PyDoc_STRVAR(GMPy_doc_mpz_function_is_prime,
"is_prime(x, n=25, /) -> bool\n\n"
"Return `True` if x is _probably_ prime, else `False` if x is\n"
"Return `True` if x is *probably* prime, else `False` if x is\n"
"definitely composite. x is checked for small divisors and up\n"
"to n Miller-Rabin tests are performed.");

Expand Down Expand Up @@ -1357,7 +1357,7 @@ GMPy_MPZ_Function_IsPrime(PyObject *self, PyObject *args)

PyDoc_STRVAR(GMPy_doc_mpz_method_is_prime,
"x.is_prime(n=25, /) -> bool\n\n"
"Return `True` if x is _probably_ prime, else `False` if x is\n"
"Return `True` if x is *probably* prime, else `False` if x is\n"
"definitely composite. x is checked for small divisors and up\n"
"to n Miller-Rabin tests are performed.");

Expand Down

0 comments on commit a2d5eb3

Please sign in to comment.