[PATCH] D150763: [NFC][Py Reformat] Reformat python files in libcxx/libcxxabi

Mark de Wever via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 10:29:38 PDT 2023

Mordante accepted this revision.
Mordante added a comment.


Comment at: libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py:7
+# ===----------------------------------------------------------------------===##
 """Commands used to automate testing gdb pretty printers.
thieta wrote:
> Mordante wrote:
> > This looks odd. Is black set to a line length of 80 or 88 characters? IMO this header part should be the same number as characters as black. I assume it now is 81 characters.
> Black uses 88. I have another of these headers in clang to fix as well. So I'll see if I can script it after this has landed.
Sounds good to me.

Comment at: libcxx/utils/generate_feature_test_macro_components.py:9
 def get_libcxx_paths():
-  utils_path = os.path.dirname(os.path.abspath(__file__))
-  script_name = os.path.basename(__file__)
-  assert os.path.exists(utils_path)
-  src_root = os.path.dirname(utils_path)
-  include_path = os.path.join(src_root, 'include')
-  assert os.path.exists(include_path)
-  docs_path = os.path.join(src_root, 'docs')
-  assert os.path.exists(docs_path)
-  macro_test_path = os.path.join(src_root, 'test', 'std', 'language.support',
-                            'support.limits', 'support.limits.general')
-  assert os.path.exists(macro_test_path)
-  assert os.path.exists(os.path.join(macro_test_path, 'version.version.compile.pass.cpp'))
-  return script_name, src_root, include_path, docs_path, macro_test_path
+    utils_path = os.path.dirname(os.path.abspath(__file__))
+    script_name = os.path.basename(__file__)
thieta wrote:
> Mordante wrote:
> > I really would appreciate it when this file can remain unformatted for now. This will cause a lot of conflicts with D150795. The other Python files in that commit are smaller. I would be happy to run the formatter afterwards myself.
> I just fixed a bunch of conflicts and it was really easy to just do `git checkout <mybranch> <file>; black <file>` - so I wouldn't be to worried about conflicts - but if you feel strongly I can exclude it.
Note D150795 has landed.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list