diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-22 09:26:42 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-22 09:26:42 +0200 |
commit | c40c89f94cc8a6dced2b14f51aa2e87b02b7ee22 (patch) | |
tree | 8d52a7b8716376aab4a7cb2aaa0d68a7518ec6cc /gles3_builders.py | |
parent | e34b97312e91606dae2e26064dcd628dc360dc88 (diff) | |
parent | d9f8ef68df1df8cf88d484fc22995f55a9c3f9aa (diff) | |
download | redot-engine-c40c89f94cc8a6dced2b14f51aa2e87b02b7ee22.tar.gz |
Merge pull request #90457 from Chubercik/ruff-formatter
Replace `black` formatter with `ruff`
Diffstat (limited to 'gles3_builders.py')
-rw-r--r-- | gles3_builders.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gles3_builders.py b/gles3_builders.py index 1491927feb..a4928c81c5 100644 --- a/gles3_builders.py +++ b/gles3_builders.py @@ -1,9 +1,10 @@ """Functions used to generate source files during build time""" import os.path -from methods import print_error from typing import Optional +from methods import print_error + class GLES3HeaderStruct: def __init__(self): @@ -91,11 +92,11 @@ def include_file_in_gles3_header(filename: str, header_data: GLES3HeaderStruct, includeline = line.replace("#include ", "").strip()[1:-1] 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_gles3_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_gles3_header(included_file, header_data, depth + 1) is None: print_error(f'In file "{filename}": #include "{includeline}" could not be found!"') @@ -121,7 +122,7 @@ def include_file_in_gles3_header(filename: str, header_data: GLES3HeaderStruct, # unfiorm array x = x[: x.find("[")] - if not x in header_data.texunit_names: + if x not in header_data.texunit_names: header_data.texunits += [(x, texunit)] header_data.texunit_names += [x] @@ -142,7 +143,7 @@ def include_file_in_gles3_header(filename: str, header_data: GLES3HeaderStruct, # unfiorm array x = x[: x.find("[")] - if not x in header_data.ubo_names: + if x not in header_data.ubo_names: header_data.ubos += [(x, ubo)] header_data.ubo_names += [x] @@ -157,7 +158,7 @@ def include_file_in_gles3_header(filename: str, header_data: GLES3HeaderStruct, # unfiorm array x = x[: x.find("[")] - if not x in header_data.uniforms: + if x not in header_data.uniforms: header_data.uniforms += [x] if (line.strip().find("out ") == 0 or line.strip().find("flat ") == 0) and line.find("tfb:") != -1: |