Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit c097439

Browse files
committed
Revert threejs_scripts method name changes
1 parent eed14d3 commit c097439

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/sage/plot/plot3d/base.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ cdef class Graphics3d(SageObject):
450450
js_options['axesLabels'] = False
451451

452452
from sage.repl.rich_output import get_display_manager
453-
scripts = get_display_manager().threejs_script(options['online'])
453+
scripts = get_display_manager().threejs_scripts(options['online'])
454454
styles = ''
455455
extra_html = ''
456456

src/sage/repl/rich_output/backend_ipython.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def is_in_terminal(self):
397397
"""
398398
return True
399399

400-
def threejs_offline_script(self):
400+
def threejs_offline_scripts(self):
401401
"""
402402
Three.js script for the IPython command line
403403
@@ -409,7 +409,7 @@ def threejs_offline_script(self):
409409
410410
sage: from sage.repl.rich_output.backend_ipython import BackendIPythonCommandline
411411
sage: backend = BackendIPythonCommandline()
412-
sage: backend.threejs_offline_script()
412+
sage: backend.threejs_offline_scripts()
413413
'...<script ...</script>...'
414414
"""
415415
from sage.env import THREEJS_DIR
@@ -583,7 +583,7 @@ def displayhook(self, plain_text, rich_output):
583583
else:
584584
raise TypeError('rich_output type not supported')
585585

586-
def threejs_offline_script(self):
586+
def threejs_offline_scripts(self):
587587
"""
588588
Three.js script for the IPython notebook
589589
@@ -595,11 +595,11 @@ def threejs_offline_script(self):
595595
596596
sage: from sage.repl.rich_output.backend_ipython import BackendIPythonNotebook
597597
sage: backend = BackendIPythonNotebook()
598-
sage: backend.threejs_offline_script()
598+
sage: backend.threejs_offline_scripts()
599599
'...<script src="/nbextensions/threejs/build/three.min...<\\/script>...'
600600
"""
601601
from sage.repl.rich_output import get_display_manager
602-
CDN_script = get_display_manager().threejs_script(online=True)
602+
CDN_script = get_display_manager().threejs_scripts(online=True)
603603
return """
604604
<script src="/nbextensions/threejs/build/three.min.js"></script>
605605
<script>

src/sage/repl/rich_output/display_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ def graphics_from_save(self, save_function, save_kwds,
716716
buf = OutputBuffer.from_file(filename)
717717
return output_container(buf)
718718

719-
def threejs_script(self, online):
719+
def threejs_scripts(self, online):
720720
"""
721721
Return Three.js script tag for the current backend.
722722
@@ -737,9 +737,9 @@ def threejs_script(self, online):
737737
EXAMPLES::
738738
739739
sage: from sage.repl.rich_output import get_display_manager
740-
sage: get_display_manager().threejs_script(online=True)
740+
sage: get_display_manager().threejs_scripts(online=True)
741741
'...<script src="https://cdn.jsdelivr.net/gh/sagemath/threejs-sage@...'
742-
sage: get_display_manager().threejs_script(online=False)
742+
sage: get_display_manager().threejs_scripts(online=False)
743743
Traceback (most recent call last):
744744
...
745745
ValueError: current backend does not support
@@ -755,7 +755,7 @@ def threejs_script(self, online):
755755
<script src="https://cdn.jsdelivr.net/gh/sagemath/threejs-sage@{0}/build/three.min.js"></script>
756756
""".format(version)
757757
try:
758-
return self._backend.threejs_offline_script()
758+
return self._backend.threejs_offline_scripts()
759759
except AttributeError:
760760
raise ValueError(
761761
'current backend does not support offline threejs graphics')

0 commit comments

Comments
 (0)