Skip to content

Conversation

@randombit
Copy link
Owner

Currently this is compatible with both the default output of ruff and also black.

CI checking is omitted here, will add in a later PR.

@randombit randombit requested a review from Copilot September 6, 2025 15:01
Copy link

Copilot AI left a 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.

Comment on lines +198 to +201
ffi_api(
dll.botan_mac_get_keyspec,
[c_void_p, POINTER(c_size_t), POINTER(c_size_t), POINTER(c_size_t)],
)
Copy link
Contributor

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

@coveralls
Copy link

Coverage Status

coverage: 90.662% (-0.005%) from 90.667%
when pulling 4eebbcb on jack/format-python
into ce0eeae on master.

@arckoor
Copy link
Contributor

arckoor commented Sep 7, 2025

Also, before you merge this, could you take a look at #5095? This is going to cause quite the conflict :p

@randombit
Copy link
Owner Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants