Skip to content

Commit 13a3631

Browse files
Use Path.suffix(), don't cast doc2path to str
1 parent 43e6eee commit 13a3631

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyterlite_sphinx/jupyterlite_sphinx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,8 @@ def run(self):
609609

610610

611611
def _process_docstring_examples(app: Sphinx, docname: str, source: List[str]) -> None:
612-
source_path: str = str(app.env.doc2path(docname))
613-
if source_path.endswith(".py"):
612+
source_path: str = app.env.doc2path(docname)
613+
if source_path.suffix == ".py":
614614
source[0] = insert_try_examples_directive(source[0])
615615

616616

0 commit comments

Comments
 (0)