-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'Python formatting' from Travis Downs
This series enforces python formatting via a CI check, starting with addr2line files. It also formats those two files. The formatter is black which seems like the dominant formatter these days and it adheres to (a subset of) PEP8 and seems generally in line with our own formatting. The two config changes I made from the defaults were to extend the line length to 120 (from 88) and to disable "string conversion" (which changes almost all `'` to `"`). This reduces the churn a lot but I'm also happy to remove those (or just the latter) if we want to go totally default. Closes #2441 * github.com:scylladb/seastar: python: introduce a python formatting CI check addr2line: reformat with black scripts: add pyproject.toml
- Loading branch information
Showing
4 changed files
with
393 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Python format | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
python-format: | ||
name: Enforce python format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: psf/[email protected] | ||
with: | ||
version: "24.8.0" | ||
src: ./scripts | ||
# override options so that we can specify only specific files for now | ||
options: "--check --diff --include=.*addr2line.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[tool.black] | ||
line-length = 100 | ||
skip-string-normalization = true |
Oops, something went wrong.