-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
gh-102033: Fix syntax error in Tools/c-analyzer
#102066
Conversation
Hmm, larger question than this PR, but if this has had a syntax error for the last three years, is it still useful? |
@hauntsaninja good idea! I went trough all files in
I double checked that:
To test that everyting is still working I've triggered 3dc3bd9 with a partial revert of #101657 to test the warning. However, right now |
Any idea - why |
@sobolevn It wants you to apply this diff: diff --git a/Tools/c-analyzer/cpython/_capi.py b/Tools/c-analyzer/cpython/_capi.py
index 5584677dae..dc453cb828 100644
--- a/Tools/c-analyzer/cpython/_capi.py
+++ b/Tools/c-analyzer/cpython/_capi.py
@@ -611,7 +611,7 @@ def _render_item_full(item, groupby, verbose):
yield f' {"filename:":10} {item.relfile}'
for extra in ('kind', 'level'):
#if groupby != extra:
- yield f' {extra+":":10} {getattr(item, extra)}'
+ yield f' {extra+":":10} {getattr(item, extra)}'
if verbose:
print(' ---------------------------------------')
for lno, line in enumerate(item.text, item.lno): |
Thank you! |
I'm hesitant to do any significant cleanup on this tool before we've re-enabled the CI check for globals. Would you mind if we tabled this until then? |
Sure, seems reasonable! |
Since #102506 was merged, I think we can return to this PR. Re-running the CI. |
@ericsnowcurrently the CI passed with your new changes. What are the next steps? |
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.
LGTM
This change is almost entirely deleting unused code. I don't expect that any of that code is important to keep at this point. Thanks for doing this!
Thanks everyone! Is there anything else I need to do? :) |
Thanks again, @sobolevn! |
The easiest way to format strings with
{}
meaningful chars is via%
.Automerge-Triggered-By: GH:ericsnowcurrently