mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
SCons: Apply new ruff/mypy fixes
This commit is contained in:
parent
f60f69aa57
commit
382c760ea6
6 changed files with 29 additions and 31 deletions
|
@ -920,7 +920,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
|
|||
# Ascendants
|
||||
if class_def.inherits:
|
||||
inherits = class_def.inherits.strip()
|
||||
f.write(f'**{translate("Inherits:")}** ')
|
||||
f.write(f"**{translate('Inherits:')}** ")
|
||||
first = True
|
||||
while inherits is not None:
|
||||
if not first:
|
||||
|
@ -947,7 +947,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
|
|||
inherited.append(c.name)
|
||||
|
||||
if len(inherited):
|
||||
f.write(f'**{translate("Inherited By:")}** ')
|
||||
f.write(f"**{translate('Inherited By:')}** ")
|
||||
for i, child in enumerate(inherited):
|
||||
if i > 0:
|
||||
f.write(", ")
|
||||
|
@ -1496,7 +1496,7 @@ def make_type(klass: str, state: State) -> str:
|
|||
return f"``{link_type}``"
|
||||
|
||||
if klass.endswith("[]"): # Typed array, strip [] to link to contained type.
|
||||
return f":ref:`Array<class_Array>`\\[{resolve_type(klass[:-len('[]')])}\\]"
|
||||
return f":ref:`Array<class_Array>`\\[{resolve_type(klass[: -len('[]')])}\\]"
|
||||
|
||||
if klass.startswith("Dictionary["): # Typed dictionary, split elements to link contained types.
|
||||
parts = klass[len("Dictionary[") : -len("]")].partition(", ")
|
||||
|
@ -2542,7 +2542,7 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_
|
|||
for i, text in enumerate(row):
|
||||
if column_sizes[i] == 0 and remove_empty_columns:
|
||||
continue
|
||||
row_text += f' {(text or "").ljust(column_sizes[i])} |'
|
||||
row_text += f" {(text or '').ljust(column_sizes[i])} |"
|
||||
row_text += "\n"
|
||||
|
||||
f.write(f" {row_text}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue