Skip to content

[WIP] Run Black formatter on Python files for code style conformity#11

Merged
pangerlkr merged 2 commits intomainfrom
copilot/format-python-files-with-black
Feb 16, 2026
Merged

[WIP] Run Black formatter on Python files for code style conformity#11
pangerlkr merged 2 commits intomainfrom
copilot/format-python-files-with-black

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Black Formatting Fix Plan

  • Identify files needing Black formatting (4 files found)
  • Run Black formatter on all Python files in modules-python/, gateway/, and tests/
  • Verify Black formatting passes
  • Run CI lint checks locally to confirm all linting passes
  • Request code review

Files formatted:

  1. ✅ gateway/config.py - Consolidated field definitions to single lines
  2. ✅ gateway/app.py - Consolidated sys.path.insert call
  3. ✅ modules-python/main.py - Consolidated redis_client.setex call
  4. ✅ tests/test_python_modules.py - Consolidated multiple test method calls

Changes:

  • All changes are formatting-only (no functional changes)
  • Reduced total lines by 18 across 4 files
  • Black check now passes: ✅ 13 files unchanged
  • isort check also passes: ✅

Configuration: Using Black with line-length 127 from pyproject.toml

Original prompt

Problem

The CI/CD pipeline is failing because 4 Python files do not conform to Black code formatting standards. The lint job reports:

  • tests/test_python_modules.py would be reformatted
  • 3 additional files would be reformatted
  • Total: 4 files need formatting

Solution Required

Run Black formatter on all Python files in the following directories to ensure they conform to Black's code style:

  • modules-python/
  • gateway/
  • tests/

Black Configuration

Use Black with default settings (line length 88, Python 3.6+ syntax)

Files to Format

Based on the CI workflow at .github/workflows/ci.yml line 74, the command is:

black --check modules-python gateway tests

To fix the issues, run:

black modules-python gateway tests

Acceptance Criteria

  • All Python files in modules-python/, gateway/, and tests/ directories should pass Black formatting checks
  • The CI job "Check formatting with black" should pass
  • No functional code changes, only formatting adjustments

Reference

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pangerlkr <73515951+pangerlkr@users.noreply.github.com>
@pangerlkr pangerlkr marked this pull request as ready for review February 16, 2026 15:25
Copilot AI review requested due to automatic review settings February 16, 2026 15:25
@pangerlkr pangerlkr merged commit 661ffc5 into main Feb 16, 2026
2 checks passed
Copilot AI requested a review from pangerlkr February 16, 2026 15:26
Copilot stopped work on behalf of pangerlkr due to an error February 16, 2026 15:26
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 applies Black formatter to fix CI/CD pipeline failures caused by non-conforming Python code formatting. The changes consolidate multi-line function calls and field definitions to single lines while respecting the project's configured line length of 127 characters. All modifications are purely cosmetic with no functional impact.

Changes:

  • Consolidated multi-line function calls to single lines in test files
  • Reformatted Field definitions in configuration files to single-line format
  • Applied Black formatting to sys.path.insert and redis client calls

Reviewed changes

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

File Description
tests/test_python_modules.py Consolidated 4 multi-line test method calls (identify_ioc_type and update_feed) to single lines
modules-python/main.py Consolidated redis_client.setex call to single line
gateway/config.py Consolidated Field definitions for jwt_secret and cors_origins to single lines
gateway/app.py Consolidated sys.path.insert call to single line

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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