main: fix code style
All checks were successful
All checks were successful
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from .taxonomy import Taxonomy
|
from .taxonomy import Taxonomy
|
||||||
|
|
||||||
|
|
||||||
def __init__(globals):
|
def __init__(globals):
|
||||||
import importlib.resources
|
import importlib.resources
|
||||||
from .xml import Node, parse_xml
|
from .xml import Node, parse_xml
|
||||||
@@ -11,5 +12,6 @@ def __init__(globals):
|
|||||||
|
|
||||||
globals['taxonomy'] = Taxonomy(*roots)
|
globals['taxonomy'] = Taxonomy(*roots)
|
||||||
|
|
||||||
|
|
||||||
__init__(globals())
|
__init__(globals())
|
||||||
del __init__
|
del __init__
|
||||||
|
|||||||
@@ -976,4 +976,3 @@ class Taxonomy:
|
|||||||
relationship_type = 'input_of' if 'const' in arg_type_prefix or arg_type_suffix.startswith('const') else 'output_of'
|
relationship_type = 'input_of' if 'const' in arg_type_prefix or arg_type_suffix.startswith('const') else 'output_of'
|
||||||
if arg_info['class'] in ('struct', 'union'):
|
if arg_info['class'] in ('struct', 'union'):
|
||||||
self._init_relationship_complex(command_name, arg_info['type'], relationship_type)
|
self._init_relationship_complex(command_name, arg_info['type'], relationship_type)
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class Node:
|
|||||||
return self.parent_node.child_nodes[self.parent_index + 1]
|
return self.parent_node.child_nodes[self.parent_index + 1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def previous_sibling_element(self) -> 'Optional[Node]':
|
def previous_sibling_element(self) -> 'Optional[Node]':
|
||||||
sibling = self.previous_sibling
|
sibling = self.previous_sibling
|
||||||
@@ -160,7 +160,7 @@ class Node:
|
|||||||
return sibling
|
return sibling
|
||||||
sibling = sibling.previous_sibling
|
sibling = sibling.previous_sibling
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def next_sibling_element(self) -> 'Optional[Node]':
|
def next_sibling_element(self) -> 'Optional[Node]':
|
||||||
sibling = self.next_sibling
|
sibling = self.next_sibling
|
||||||
@@ -179,7 +179,7 @@ class Node:
|
|||||||
@cached_property
|
@cached_property
|
||||||
def file_path(self) -> str:
|
def file_path(self) -> str:
|
||||||
return f'{self.root.file}:{self.line}:{self.column}'
|
return f'{self.root.file}:{self.line}:{self.column}'
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def file_url(self) -> str:
|
def file_url(self) -> str:
|
||||||
return f'{self.root.url}:{self.line}:{self.column}'
|
return f'{self.root.url}:{self.line}:{self.column}'
|
||||||
|
|||||||
Reference in New Issue
Block a user