Skip to content

Commit c8bbf22

Browse files
committed
Fix some lint issues
1 parent 34f4da7 commit c8bbf22

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/sphinx_notion/__init__.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
)
2525

2626
# Wait for ``sphinxnotes-strike`` to release a version with type stubs.
27-
from sphinxnotes.strike import (
28-
strike_node, # pyright: ignore[reportMissingTypeStubs]
27+
from sphinxnotes.strike import ( # pyright: ignore[reportMissingTypeStubs]
28+
strike_node,
2929
)
3030
from ultimate_notion import Emoji
3131
from ultimate_notion.blocks import Block, ChildrenMixin
@@ -1135,15 +1135,21 @@ def _depart_video_node_notion(
11351135
del node
11361136

11371137

1138-
def _override_strike_role( # pylint: disable=dangerous-default-value
1138+
@beartype
1139+
def _override_strike_role(
11391140
typ: str,
11401141
rawtext: str,
11411142
text: str, # pylint: disable=redefined-outer-name
11421143
lineno: int,
11431144
inliner: Inliner,
1144-
options: dict[Any, Any] = {},
1145-
content: list[str] = [],
1145+
options: dict[Any, Any] | None = None,
1146+
content: list[str] | None = None,
11461147
) -> tuple[list[nodes.Node], list[nodes.system_message]]:
1148+
"""The ``sphinxnotes-strike`` extension's ``strike_role`` is overridden to
1149+
process strike nodes into Notion blocks.
1150+
1151+
This will not be needed after ``sphinxnotes-strike`` 1.3 is released.
1152+
"""
11471153
del typ
11481154
del lineno
11491155
del options
@@ -1153,6 +1159,7 @@ def _override_strike_role( # pylint: disable=dangerous-default-value
11531159
node["docname"] = env.docname
11541160
return [node], []
11551161

1162+
11561163
@beartype
11571164
def setup(app: Sphinx) -> ExtensionMetadata:
11581165
"""

0 commit comments

Comments
 (0)