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 11"""Manipulating the Sphinx AST with Jupyter objects"""
22
33import json
4+ import warnings
45from pathlib import Path
56
67import docutils
@@ -588,7 +589,13 @@ def apply_styling(node, thebe_config):
588589class JupyterDownloadRole (ReferenceRole ):
589590 def run (self ):
590591 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+ )
592599
593600 assert filetype in ("notebook" , "nb" , "script" )
594601 ext = ".ipynb" if filetype in ("notebook" , "nb" ) else ".py"
You can’t perform that action at this time.
0 commit comments