Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes #452

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading