Skip to content

Commit

Permalink
Merge pull request #430 from skirpichev/include-prev_prime
Browse files Browse the repository at this point in the history
Include prev_prime() to the sphinx docs unconditionaly
  • Loading branch information
casevh authored Sep 11, 2023
2 parents 7f09f58 + a7b1129 commit 5ac3746
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
6 changes: 0 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,3 @@
('index', 'gmpy2', 'gmpy2 Documentation',
['Case Van Horsen'], 3)
]

import gmpy2
if gmpy2.mp_version() >= "GMP 6.3.0":
tags.add('has_prev_prime')

print(tags.tags)
14 changes: 3 additions & 11 deletions docs/mpz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,10 @@ mpz Functions
.. autofunction:: powmod_exp_list
.. autofunction:: powmod_base_list
.. autofunction:: powmod_sec
.. only:: has_prev_prime
.. function:: prev_prime(x, /) -> mpz

..
Can't use autofunction:: prev_prime as sphinx tries to import
regardless of has_prev_prime conditional.

.. function:: prev_prime(x, /) -> mpz

Return the previous *probable* prime number < x.

Only present when compiled with GMP 6.3.0 or later.
Return the previous *probable* prime number < x.
Only present when compiled with GMP 6.3.0 or later.

.. autofunction:: primorial
.. autofunction:: remove
Expand Down

0 comments on commit 5ac3746

Please sign in to comment.