Skip to content

Auto format the code + update the readme with the new project template#2

Draft
John15321 wants to merge 2 commits into
mainfrom
john15321/reformat-code
Draft

Auto format the code + update the readme with the new project template#2
John15321 wants to merge 2 commits into
mainfrom
john15321/reformat-code

Conversation

@John15321

Copy link
Copy Markdown
Member

Signed-off-by: Jan Bronicki janbronicki@gmail.com

Signed-off-by: Jan Bronicki <janbronicki@gmail.com>
Copilot AI review requested due to automatic review settings July 8, 2026 21:51
return False
return "bugs.gentoo.org" in text or "glsa.gentoo.org" in text or "security.gentoo.org/glsa" in text
return (
"bugs.gentoo.org" in text
return "bugs.gentoo.org" in text or "glsa.gentoo.org" in text or "security.gentoo.org/glsa" in text
return (
"bugs.gentoo.org" in text
or "glsa.gentoo.org" in text
without_scripts = re.sub(r"<script\b[^>]*>.*?</script>", " ", text, flags=re.IGNORECASE | re.DOTALL)
without_styles = re.sub(r"<style\b[^>]*>.*?</style>", " ", without_scripts, flags=re.IGNORECASE | re.DOTALL)
without_scripts = re.sub(
r"<script\b[^>]*>.*?</script>", " ", text, flags=re.IGNORECASE | re.DOTALL

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request primarily applies automated formatting across the Python codebase and updates the README to reflect the current project template and recommended developer workflow (uv + Makefile). It also standardizes UTC handling by switching several modules from timezone.utc to datetime.UTC (consistent with the project’s Python >=3.12 requirement).

Changes:

  • Reformat code and tests (line wrapping, import grouping, dict/list formatting) to match the formatter’s output.
  • Update README with uv/Makefile-based installation, development, and CI workflow documentation.
  • Normalize UTC usage in a few modules by using datetime.UTC.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_xml_security.py Formatting-only changes to improve readability of a long call.
tests/test_workflows.py Formatting-only changes (line wrapping for long expressions and asserts).
tests/test_sources_models.py Formatting-only changes; preserves existing test intent while wrapping long calls/asserts.
tests/test_rustsec.py Formatting-only changes (blank lines removed, long assert wrapped, dict formatting).
tests/test_rules.py Formatting-only changes (wrap long expected lists and call args).
tests/test_prompt_hardening.py Formatting-only changes (wrap long asserts and string concatenation).
tests/test_oss_security.py Formatting-only changes (line wrapping, whitespace cleanup).
tests/test_issues_sbom.py Formatting-only changes (import grouping, wrapped calls/asserts).
tests/test_http_security.py Formatting-only changes (import grouping, small expression simplification, wrapped signature).
tests/test_go_vulndb.py Formatting-only changes (dict literals and list formatting).
tests/test_field_injection.py Formatting-only changes (inline constant string, wrapped comprehensions).
tests/test_env.py Formatting-only changes (string literal quoting).
tests/test_cli.py Formatting-only changes (wrap parser arg lists and asserts).
tests/test_actions.py Formatting-only changes (wrap constructor call).
src/security_triage/time_utils.py Switch to datetime.UTC and reformat function signatures/blocks.
src/security_triage/sources.py Formatting-only changes; preserves existing source fetching/filtering logic.
src/security_triage/sbom.py Formatting-only changes; minor type annotation modernization consistent with from __future__ import annotations.
src/security_triage/rustsec.py Formatting-only changes (line wrapping and small conditional formatting).
src/security_triage/rules.py Formatting-only changes; some long expressions made multi-line for clarity.
src/security_triage/reporting.py Formatting-only changes (wrapping list construction and long f-strings).
src/security_triage/reasoning.py Formatting-only changes (wrap list comprehension).
src/security_triage/prompt_cache.py Formatting-only changes (wrap json encoding and method signature).
src/security_triage/oss_security.py Switch to datetime.UTC and formatting-only changes.
src/security_triage/models.py Formatting-only changes (wrapping long log calls/conditions and helper logic).
src/security_triage/issues.py Formatting-only changes (import grouping, wrapped calls and regex definition).
src/security_triage/issue_updates.py Formatting-only changes (wrap long conditions/sets).
src/security_triage/io_utils.py Formatting-only changes (wrap exception messages and json writes).
src/security_triage/http_utils.py Formatting-only changes (wrap signatures and long error messages).
src/security_triage/go_vulndb.py Formatting-only changes (wrap complex calls and dict coercions).
src/security_triage/env.py Formatting-only changes (wrap long loops and conditionals).
src/security_triage/discovery.py Formatting-only changes (import grouping, wrapped logs/calls, small readability tweaks).
src/security_triage/debug.py Switch to datetime.UTC and formatting-only changes.
src/security_triage/console.py Switch to datetime.UTC and formatting-only changes.
src/security_triage/cli.py Formatting-only changes (wrap argparse definitions and model wiring).
src/security_triage/cleanup.py Formatting-only changes (wrap logging, calls, and return tuples).
src/security_triage/actions.py Formatting-only changes (wrap signatures, structured dict literals).
README.md Update documentation to the uv/Makefile project template and include CI/release workflow notes.

… for improved code quality and readability

Signed-off-by: Jan Bronicki <janbronicki@gmail.com>
Copilot AI review requested due to automatic review settings July 8, 2026 22:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.

Comment on lines 50 to +52
def read(self, amount=None):
# Return more than the caller asked for to simulate a huge body.
return b"x" * ((amount or 0))
return b"x" * (amount or 0)
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.

3 participants