File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
"""Manipulating the Sphinx AST with Jupyter objects"""
2
2
3
3
import json
4
+ import warnings
4
5
from pathlib import Path
5
6
6
7
import docutils
@@ -588,7 +589,13 @@ def apply_styling(node, thebe_config):
588
589
class JupyterDownloadRole (ReferenceRole ):
589
590
def run (self ):
590
591
sep = ":" if ":" in self .name else "-"
591
- _ , filetype = self .name .rsplit (sep , maxsplit = 1 )
592
+ name , filetype = self .name .rsplit (sep , maxsplit = 1 )
593
+ if sep == ":" :
594
+ warnings .warn (
595
+ f"The { self .name } syntax is deprecated and "
596
+ f"will be removed in 0.5.0, please use { name } -{ filetype } " ,
597
+ category = DeprecationWarning ,
598
+ )
592
599
593
600
assert filetype in ("notebook" , "nb" , "script" )
594
601
ext = ".ipynb" if filetype in ("notebook" , "nb" ) else ".py"
You can’t perform that action at this time.
0 commit comments