[clang-tools-extra] [clang-tidy][NFC] Run ruff over python scripts (PR #176927)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 20 06:52:31 PST 2026


EugeneZelenko wrote:

Some notes for further improvements:

* Line 396 could be changed to `map(methodcaller("endswith", ".rst"), os.listdir(os.path.join(docs_dir, subdir)))`. `methodcaller` is defined in `operator`.
* Walrus operator could be used for conditional statements in lines 416 and below. If I'm not mistaken, `PyLint` has such rule and `Ruff` claims to be `PyLint` replacement.
* Conditional statement in line 753 could be replaces with `match/case`.

https://github.com/llvm/llvm-project/pull/176927


More information about the cfe-commits mailing list