main: fix code style
All checks were successful
CI / Code Style (autopep8) (push) Successful in 15s
CI / Tests (Python 3.12) (push) Successful in 19s
CI / Tests (Python 3.13) (push) Successful in 20s
CI / Tests (Python 3.14) (push) Successful in 21s
CI / Coverage (Python 3.12) (push) Successful in 21s

This commit is contained in:
2026-05-09 18:41:43 +03:00
parent adfbe57954
commit f031216b1a
3 changed files with 5 additions and 4 deletions

View File

@@ -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__

View File

@@ -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)

View File

@@ -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}'