-
Notifications
You must be signed in to change notification settings - Fork 623
Format all Python code using ruff #5096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR formats all Python code using ruff, updating the formatting to be consistent with both ruff's default output and black. The changes are purely formatting-related and maintain compatibility with both tools.
- Standardizes string quotes to double quotes throughout Python files
- Adds proper spacing and line breaks for better readability
- Formats function calls and imports according to modern Python conventions
Reviewed Changes
Copilot reviewed 61 out of 64 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/scripts/website.py | Formatted string quotes, function calls and imports |
| src/scripts/tls_scanner/tls_scanner.py | Updated string quotes and function formatting |
| src/scripts/test_strubbed_symbols.py | Applied consistent formatting and line breaks |
| src/scripts/test_python.py | Extensive formatting changes including quotes and line wrapping |
| src/scripts/test_fuzzers.py | Formatted function calls and string literals |
| src/scripts/test_cli_crypt.py | Updated quotes and improved line formatting |
| src/scripts/test_all_configs.py | Applied consistent string formatting |
| src/scripts/run_tls_fuzzer.py | Formatted quotes and function calls |
| src/scripts/run_tls_attacker.py | Updated string literals and formatting |
| src/scripts/run_tests_under_valgrind.py | Applied consistent formatting |
| src/scripts/run_limbo_tests.py | Formatted quotes and improved readability |
| src/scripts/rewrite_lcov.py | Updated string quotes and formatting |
| src/scripts/repo_config.py | Applied consistent formatting |
| src/scripts/python_unittests_unix.py | Updated string quotes |
| src/scripts/python_unittests.py | Applied consistent formatting and line breaks |
| src/scripts/install.py | Formatted function calls and string literals |
| src/scripts/gdb/strubtest.py | Updated quotes and improved formatting |
| src/scripts/dist.py | Extensive formatting changes for better readability |
| src/scripts/dev_tools/*.py | Applied consistent formatting across all dev tool scripts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ffi_api( | ||
| dll.botan_mac_get_keyspec, | ||
| [c_void_p, POINTER(c_size_t), POINTER(c_size_t), POINTER(c_size_t)], | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to encapsulate the entire ffi_api block with
# fmt: off
...
# fmt: on
but up to you
|
Also, before you merge this, could you take a look at #5095? This is going to cause quite the conflict :p |
|
@arckoor Thanks for the ping I didn't realize that PR was also modifying the Python lib but yeah let's get that landed first then the reformat. |
Currently this is compatible with both the default output of
ruffand alsoblack.CI checking is omitted here, will add in a later PR.