mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Update pre-commit hooks configuration to use ruff
instead of black
This commit is contained in:
parent
aaa4560729
commit
d9f8ef68df
47 changed files with 244 additions and 241 deletions
|
@ -1,8 +1,9 @@
|
|||
"""Functions used to generate source files during build time"""
|
||||
|
||||
import os.path
|
||||
from typing import Iterable, Optional
|
||||
|
||||
from methods import print_error
|
||||
from typing import Optional, Iterable
|
||||
|
||||
|
||||
def generate_inline_code(input_lines: Iterable[str], insert_newline: bool = True):
|
||||
|
@ -77,15 +78,15 @@ def include_file_in_rd_header(filename: str, header_data: RDHeaderStruct, depth:
|
|||
else:
|
||||
included_file = os.path.relpath(os.path.dirname(filename) + "/" + includeline)
|
||||
|
||||
if not included_file in header_data.vertex_included_files and header_data.reading == "vertex":
|
||||
if included_file not in header_data.vertex_included_files and header_data.reading == "vertex":
|
||||
header_data.vertex_included_files += [included_file]
|
||||
if include_file_in_rd_header(included_file, header_data, depth + 1) is None:
|
||||
print_error(f'In file "{filename}": #include "{includeline}" could not be found!"')
|
||||
elif not included_file in header_data.fragment_included_files and header_data.reading == "fragment":
|
||||
elif included_file not in header_data.fragment_included_files and header_data.reading == "fragment":
|
||||
header_data.fragment_included_files += [included_file]
|
||||
if include_file_in_rd_header(included_file, header_data, depth + 1) is None:
|
||||
print_error(f'In file "{filename}": #include "{includeline}" could not be found!"')
|
||||
elif not included_file in header_data.compute_included_files and header_data.reading == "compute":
|
||||
elif included_file not in header_data.compute_included_files and header_data.reading == "compute":
|
||||
header_data.compute_included_files += [included_file]
|
||||
if include_file_in_rd_header(included_file, header_data, depth + 1) is None:
|
||||
print_error(f'In file "{filename}": #include "{includeline}" could not be found!"')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue