Skip to content

Commit

Permalink
fix error & debug
Browse files Browse the repository at this point in the history
Signed-off-by: Mecoli1219 <[email protected]>
  • Loading branch information
Mecoli1219 committed Nov 12, 2024
1 parent 2431ee9 commit 7a1ffdb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/_ext/notebook_rli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from docutils import nodes
from docutils.parsers.rst import directives
from six import text_type
from typing import Dict, Any, List, Tuple
from typing import Any, Dict, List, Tuple

from sphinx.application import Sphinx
from sphinx.config import Config
from sphinx.directives.code import container_wrapper, logger
from sphinx.locale import __
from sphinx.util import parselinenos
from sphinx.util.docutils import SphinxDirective
from sphinx.config import Config
from sphinx.util.nodes import set_source_info
from sphinx.directives.code import logger
from sphinx.directives.code import container_wrapper


class NotebookRemoteLiteralIncludeReader(object):
Expand Down Expand Up @@ -136,8 +136,8 @@ def run(self) -> List[nodes.Node]:
return [document.reporter.warning(text_type(exc), line=self.lineno)]


def setup(app):
directives.register_directive("nb-rli", NotebookRemoteLiteralInclude)
def setup(app: Sphinx) -> dict:
app.add_directive("nb-rli", NotebookRemoteLiteralInclude)

return {
"parallel_read_safe": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@
:caption: basics/basic_interactive_mode.ipynb
:cell: 6
```

```{rli} https://raw.githubusercontent.com/Mecoli1219/flytesnacks/85966d139a9a3ccdf3323124563960fdd5f5844a/examples/basics/basics/basic_interactive_mode.ipynb
:caption: basics/basic_interactive_mode.ipynb
:lines: 1-4
```

0 comments on commit 7a1ffdb

Please sign in to comment.