This is an archive of the discontinued LLVM Phabricator instance.

[NFC][Py Reformat] Reformat python files in clang and clang-tools-extra
ClosedPublic

Authored by thieta on May 17 2023, 1:59 AM.

Details

Summary

This is an ongoing series of commits that are reformatting our
Python code.

Reformatting is done with black.

If you end up having problems merging this commit because you
have made changes to a python file, the best way to handle that
is to run git checkout --ours <yourfile> and then reformat it
with black.

If you run into any problems, post to discourse about it and
we will try to help.

RFC Thread below:

https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Diff Detail

Event Timeline

thieta created this revision.May 17 2023, 1:59 AM
Herald added a reviewer: njames93. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
thieta requested review of this revision.May 17 2023, 1:59 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
barannikov88 added inline comments.
clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
9

This is unfortunate. The comment is now asymmetric.
I guess this is not a big deal, but maybe someone has an idea how to prettify it.

thieta added inline comments.May 17 2023, 8:07 AM
clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
9

I'll see if I can make it better after this diff has landed.

MatzeB accepted this revision.May 17 2023, 10:56 AM

Inspected 5 random files and they looked fine as expected. Do you know if the test failures are unrealted?

LGTM with test failures resolved.

This revision is now accepted and ready to land.May 17 2023, 10:56 AM

Checked clang-tidy scripts, looks +- fine.