Update pre-commit hooks configuration to use ruff instead of black

This commit is contained in:
Jakub Marcowski 2024-05-21 15:14:59 +02:00 committed by Thaddeus Crews
parent aaa4560729
commit d9f8ef68df
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
47 changed files with 244 additions and 241 deletions

View file

@ -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!"')