Skip to content

Run formatter on alembic files#3034

Merged
gantoine merged 1 commit intomasterfrom
fmt-alembic-files
Feb 17, 2026
Merged

Run formatter on alembic files#3034
gantoine merged 1 commit intomasterfrom
fmt-alembic-files

Conversation

@gantoine
Copy link
Copy Markdown
Member

Description
Explain the changes or enhancements you are proposing with this pull request.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gantoine, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request applies an automated code formatter across the repository, with a significant focus on the Alembic migration scripts. The primary goal is to enhance code consistency and readability by standardizing whitespace and formatting of multi-line string literals, especially for SQL queries. Beyond the widespread formatting, minor functional additions and type-hinting improvements were made, alongside an explicit linter ignore for a specific case.

Highlights

  • Codebase-wide Formatting Application: An automated formatter was run across various Python files, significantly impacting Alembic migration scripts and other backend components, ensuring consistent code style.
  • SQL Query Readability Improvements: Multi-line SQL queries within Alembic files were reformatted for better readability, primarily by adjusting indentation and removing redundant parentheses around 'sa.text()' calls.
  • Minor Code Adjustments: Includes a type hint refinement in 'base_handler.py', the addition of 'multiplayer_modes' and 'player_count' fields to 'IGDBMetadata' in 'hasheous_handler.py', and the introduction of a linter ignore comment in 'auth.py'.
Changelog
  • backend/alembic/versions/0014_asset_files.py
    • Reformatted multi-line SQL queries within the 'upgrade' and 'downgrade' functions for improved readability.
  • backend/alembic/versions/0019_resources_refactor.py
    • Reformatted a multi-line SQL query in the 'upgrade' function.
  • backend/alembic/versions/0021_rom_user.py
    • Reformatted multi-line SQL queries in both 'upgrade' and 'downgrade' functions.
  • backend/alembic/versions/0024_sibling_roms_db_view.py
    • Reformatted multi-line SQL queries for view creation and dropping.
  • backend/alembic/versions/0033_rom_file_and_hashes.py
    • Reformatted multi-line SQL queries for data insertion and updates in 'upgrade' and 'downgrade' functions.
  • backend/alembic/versions/0034_virtual_collections_db_view.py
    • Reformatted multi-line SQL queries for collection data migration and virtual view creation.
  • backend/alembic/versions/0037_virtual_rom_columns.py
    • Reformatted multi-line SQL queries for the 'roms_metadata' view creation.
  • backend/alembic/versions/0038_add_ssid_to_sibling_roms.py
    • Reformatted multi-line SQL queries for the 'sibling_roms' view definition in both 'upgrade' and 'downgrade'.
  • backend/alembic/versions/0040_migrate_assets_paths.py
    • Reformatted multi-line SQL queries used for selecting and updating asset paths.
  • backend/alembic/versions/0041_assets_t_thumb_cleanup.py
    • Reformatted multi-line SQL queries for updating image URLs.
  • backend/alembic/versions/0045_roms_metadata_update.py
    • Reformatted multi-line SQL queries for the 'roms_metadata' view.
  • backend/alembic/versions/0048_sibling_roms_more_ids.py
    • Reformatted multi-line SQL queries for the 'sibling_roms' view definition.
  • backend/alembic/versions/0050_firmware_add_is_verified.py
    • Reformatted a multi-line SQL query for fetching firmware records.
  • backend/alembic/versions/0052_roms_metadata_flashpoint.py
    • Reformatted multi-line SQL queries for the 'roms_metadata' view.
  • backend/alembic/versions/0055_collection_is_favorite.py
    • Reformatted a multi-line SQL query for updating collection favorite status.
  • backend/alembic/versions/0057_multi_notes.py
    • Reformatted multi-line SQL queries for migrating notes between tables.
  • backend/alembic/versions/0058_roms_metadata_launchbox.py
    • Reformatted multi-line SQL queries for the 'roms_metadata' view.
  • backend/alembic/versions/0061_manual_metadata.py
    • Reformatted multi-line SQL queries for the 'roms_metadata' view.
  • backend/alembic/versions/0062_rom_file_category_enum.py
    • Reformatted multi-line SQL queries for updating and altering the 'rom_files' category column.
  • backend/alembic/versions/0063_roms_metadata_player_count.py
    • Reformatted multi-line SQL queries for the 'roms_metadata' view.
  • backend/alembic/versions/0069_sibling_roms_fs_name.py
    • Reformatted multi-line SQL queries for the 'sibling_roms' view definition.
  • backend/alembic/versions/1.8_.py
    • Reformatted multi-line SQL queries for inserting data into the 'roms' table.
  • backend/endpoints/auth.py
    • Added a 'trunk-ignore(bandit/B105)' comment to a 'token_type' field.
    • Adjusted formatting for dictionary declarations.
  • backend/handler/metadata/base_handler.py
    • Updated the type hint for the 'values' parameter in '_mask_sensitive_values' from 'dict[str, str | None]' to 'dict[str, str]'.
  • backend/handler/metadata/hasheous_handler.py
    • Added 'multiplayer_modes' and 'player_count' fields to the 'IGDBMetadata' dictionary, including a TODO comment.
  • backend/utils/generate_supported_platforms.py
    • Reformatted a multi-line print statement for table headers.
Activity
  • The author has tested the changes locally.
  • Relevant comments within the code have been updated.
  • Reviewers have not yet been assigned for this pull request.
  • Unit tests covering the changes have not yet been added.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily applies formatting changes across numerous Alembic migration files, which improves code style consistency. While reviewing, I found a couple of minor issues in other files that appear to be side effects of the formatting run. I've provided suggestions to address an inconsistent type hint in base_handler.py and to resolve a code duplication issue highlighted by a change in hasheous_handler.py. These suggestions aim to enhance code quality and maintainability.

@github-actions
Copy link
Copy Markdown
Contributor

Test Results

801 tests   800 ✅  1m 58s ⏱️
  1 suites    1 💤
  1 files      0 ❌

Results for commit b3339c1.

@github-actions
Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
13010 8513 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/endpoints/auth.py 64% 🟢
backend/handler/metadata/base_handler.py 94% 🟢
backend/handler/metadata/hasheous_handler.py 45% 🟢
TOTAL 67% 🟢

updated for commit: b3339c1 by action🐍

@gantoine gantoine merged commit 10f2e13 into master Feb 17, 2026
11 of 12 checks passed
@gantoine gantoine deleted the fmt-alembic-files branch February 17, 2026 20:46
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.

1 participant