-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCons: Apply new ruff/mypy fixes #102371
SCons: Apply new ruff/mypy fixes #102371
Conversation
@@ -499,7 +499,7 @@ def build_gles3_header( | |||
fd.write("\t\t};\n\n") | |||
variant_count = len(header_data.variant_defines) | |||
else: | |||
fd.write("\t\tstatic const char **_variant_defines[]={" "};\n") | |||
fd.write('\t\tstatic const char **_variant_defines[]={" "};\n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the offending line, as the original fix was:
- fd.write("\t\tstatic const char **_variant_defines[]={" "};\n")
+ fd.write("\t\tstatic const char **_variant_defines[]={};\n")
The intent was to have the fallback container store a single value, but the outer double quotes meant Python was concatenating two strings instead, resulting in an empty container. Using single quotes restores the intended behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's weird. I thought pre-commit would notify me of any new changes when committing after updating locally. My bad; I'll remember to run the full suite if I happen to update ruff
/mypy
in the future.
@Chubercik By default, pre-commit only runs on files that were locally changed. You'll have to be more explicit otherwise, but it can be trimmed down to just the hooks you want to run:
|
ruff
&mypy
pre-commit hooks #102246Integrates new fixes found by the updated mypy/ruff hooks. Should've done this during/before the above PR was merged, but I forgot 🙃. This goes beyond codestyle, as a regression was identified and fixed in the process.