4 Commits

Author SHA1 Message Date
Ryan Prichard
af25304319
[Workflow] make code-format-helper.py mypy-safe (NFC) (#69691)
Fix type errors that mypy reports with code-format-helper.py.

Add a few return type annotations and change `param: [str]` to
`param: list[str]`.

Leave a few required FormatHelper members missing instead of defining a
placeholder:
 - FormatHelper.name
 - FormatHelper.friendly_name
 - FormatHelper.format_run: NotImplementedError() instead of `pass`
2023-10-20 15:07:59 -07:00
Tobias Hieta
a1177b0bdb
Reland: [Workflow] Add new code format helper.
I landed this format helper, but unfortunately, it didn't work because
of permissions, it could not add comments on a fork's PR. @cor3ntin
informed me there are fixes for this that you had worked on @tstellar -
but I didn't have time to read up on it too much. Can you explain what
changes are needed to get the action to be able to write comments on
fork's PR?
2023-09-22 10:26:09 +02:00
Tobias Hieta
fe5c185641
Revert "[Workflow] Add new code format helper. (#66684)"
This reverts commit da94bf0d561109529e4ab3dabfcbb8b6c258ea39.
2023-09-20 10:01:37 +02:00
Tobias Hieta
da94bf0d56
[Workflow] Add new code format helper. (#66684)
This helper will format python files with black/darker and
C/C++ files with clang-format.

The format helper is written so that we can expand it with new
formatters in the future like clang-tidy.
2023-09-20 08:52:29 +02:00