mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-14 13:15:00 +00:00
Black format
This commit is contained in:
parent
3d49dd9246
commit
6c3fe56acf
8 changed files with 119 additions and 118 deletions
|
@ -1,18 +1,22 @@
|
|||
from docutils.parsers.rst import Directive
|
||||
from docutils.parsers.rst import states, directives #type: ignore
|
||||
from docutils.parsers.rst import states, directives # type: ignore
|
||||
from docutils.parsers.rst.roles import set_classes
|
||||
from docutils import nodes
|
||||
from sphinx.locale import _
|
||||
|
||||
|
||||
class exception_hierarchy(nodes.General, nodes.Element):
|
||||
pass
|
||||
|
||||
|
||||
def visit_exception_hierarchy_node(self, node):
|
||||
self.body.append(self.starttag(node, 'div', CLASS='exception-hierarchy-content'))
|
||||
|
||||
|
||||
def depart_exception_hierarchy_node(self, node):
|
||||
self.body.append('</div>\n')
|
||||
|
||||
|
||||
class ExceptionHierarchyDirective(Directive):
|
||||
has_content = True
|
||||
|
||||
|
@ -22,6 +26,7 @@ class ExceptionHierarchyDirective(Directive):
|
|||
self.state.nested_parse(self.content, self.content_offset, node)
|
||||
return [node]
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_node(exception_hierarchy, html=(visit_exception_hierarchy_node, depart_exception_hierarchy_node))
|
||||
app.add_directive('exception_hierarchy', ExceptionHierarchyDirective)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue