Skip to content

Commit 9c9dd30

Browse files
committed
Fix pi() docstring indentation and stray import in runblock
The docstring was indented by an extra four spaces and a stray 'from typing import TYPE_CHECKING' line ended the runblock early, which would render incorrectly in the docs. Restore the docstring formatting to match the rest of the module; the lazy SymPy import is unchanged.
1 parent 69c8289 commit 9c9dd30

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

‎spatialmath/base/symbolic.py‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -293,20 +293,19 @@ def negative_one() -> Symbol:
293293

294294
def pi() -> Symbol:
295295
"""
296-
Symbolic constant: pi
296+
Symbolic constant: pi
297297
298-
:return: π
299-
:rtype: symbolic
298+
:return: π
299+
:rtype: symbolic
300300
301-
.. runblock:: pycon
301+
.. runblock:: pycon
302302
303-
>>> from spatialmath.base.symbolic import *
304-
>>> import math
305-
from typing import TYPE_CHECKING
306-
>>> sin(pi())
307-
>>> sin(math.pi)
303+
>>> from spatialmath.base.symbolic import *
304+
>>> import math
305+
>>> sin(pi())
306+
>>> sin(math.pi)
308307
309-
:seealso: :func:`sympy.S.Pi`
308+
:seealso: :func:`sympy.S.Pi`
310309
"""
311310
return _sympy().S.Pi
312311

0 commit comments

Comments
 (0)