Skip to content

Commit 829e4f0

Browse files
committed
Run ruff format
1 parent b2205a8 commit 829e4f0

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

Doc/tools/extensions/grammar_snippet.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99

1010
class GrammarSnippetBase(SphinxDirective):
11-
"""Common functionality for GrammarSnippetDirective & CompatProductionList.
12-
"""
11+
"""Common functionality for GrammarSnippetDirective & CompatProductionList."""
12+
1313
# The option/argument handling is left to the individual classes.
1414

1515
def make_grammar_snippet(self, options, content):
@@ -102,16 +102,10 @@ def make_link_to_token(self, group_name, name):
102102
domain = self.env.domains['std']
103103
obj_name = f"{group_name}:{name}"
104104
prefix = f'grammar-token-{group_name}'
105-
node_id = make_id(
106-
self.env, self.state.document, prefix, name
107-
)
105+
node_id = make_id(self.env, self.state.document, prefix, name)
108106
name_node['ids'].append(node_id)
109-
self.state.document.note_implicit_target(
110-
name_node, name_node
111-
)
112-
domain.note_object(
113-
'token', obj_name, node_id, location=name_node
114-
)
107+
self.state.document.note_implicit_target(name_node, name_node)
108+
domain.note_object('token', obj_name, node_id, location=name_node)
115109

116110
text_node = nodes.Text(name)
117111
name_node += text_node

0 commit comments

Comments
 (0)