refactor: ruff - underscore unused vars

This commit is contained in:
Juro Oravec 2025-09-10 18:49:44 +00:00
parent f100cc1836
commit d30f352981
4 changed files with 4 additions and 4 deletions

View file

@ -846,7 +846,7 @@ def _extract_property_docstrings(cls: Type) -> Dict[str, str]:
- The function assumes that the class is defined at the global scope (module level) - The function assumes that the class is defined at the global scope (module level)
and that the body is indented with 4 spaces. and that the body is indented with 4 spaces.
""" """
lines, start_line_index = inspect.getsourcelines(cls) lines, _start_line_index = inspect.getsourcelines(cls)
attrs_lines: List[str] = [] attrs_lines: List[str] = []
ignore = True ignore = True
for line in lines: for line in lines:

View file

@ -155,7 +155,7 @@ class ComponentListCommand(ListCommand):
data: List[Dict[str, Any]] = [] data: List[Dict[str, Any]] = []
for component in components: for component in components:
full_name = get_import_path(component) full_name = get_import_path(component)
module, module_name, module_file_path = get_module_info(component) _module, _module_name, module_file_path = get_module_info(component)
# Make paths relative to CWD # Make paths relative to CWD
if module_file_path: if module_file_path:

View file

@ -837,7 +837,7 @@ def _resolve_component_relative_files(
component_name = comp_cls.__qualname__ component_name = comp_cls.__qualname__
# Get the full path of the file where the component was defined # Get the full path of the file where the component was defined
module, module_name, module_file_path = get_module_info(comp_cls) _module, module_name, module_file_path = get_module_info(comp_cls)
if not module_file_path: if not module_file_path:
logger.debug( logger.debug(
f"Could not resolve the path to the file for component '{component_name}'." f"Could not resolve the path to the file for component '{component_name}'."

View file

@ -233,7 +233,7 @@ class ComponentFormatter(TagFormatterABC):
return f"end{self.tag}" return f"end{self.tag}"
def parse(self, tokens: List[str]) -> TagResult: def parse(self, tokens: List[str]) -> TagResult:
tag, *args = tokens _tag, *args = tokens
if not args: if not args:
raise TemplateSyntaxError(f"{self.__class__.__name__}: Component tag did not receive tag name") raise TemplateSyntaxError(f"{self.__class__.__name__}: Component tag did not receive tag name")