Skip to content

Fix ruff format lint errors in CI#31

Merged
S0UGATA merged 1 commit into
mainfrom
copilot/fix-lint-errors
Jun 6, 2026
Merged

Fix ruff format lint errors in CI#31
S0UGATA merged 1 commit into
mainfrom
copilot/fix-lint-errors

Conversation

Copilot AI commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

The lint job in CI workflow runs 26717772244 and 26717770526 failed at ruff format --check . on three files committed via recent PRs (#28, #29).

Changes

  • Ran ruff format (v0.15.15, matching CI) on the offending files:
    • src/common.py
    • src/generate_neighborhoods.py
    • tests/test_common.py
  • No logic changes; formatting only.

Summary by Sourcery

Format Python source and test files to comply with Ruff formatting rules, resolving CI lint failures.

Enhancements:

  • Reformat common utility, neighborhood generation, and related tests to match Ruff's code style without changing behavior.

CI:

  • Address Ruff format check failures in the lint workflow by aligning local formatting with CI expectations.

@sourcery-ai

sourcery-ai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Applies Ruff code formatting to fix CI lint failures, touching only whitespace and line-wrapping on a few neighborhood generation helpers, a Parquet write helper, and associated tests, with no behavioral changes.

File-Level Changes

Change Details Files
Reformat neighborhood generation helpers and constants to satisfy Ruff formatting rules.
  • Expand the junk-entity lowercased constant set to one-item-per-line layout.
  • Condense the _fetch_neighbors helper function signature onto a single line.
  • Inline the index_entries.append call arguments for neighborhood generation into a single line.
src/generate_neighborhoods.py
Align streaming write test data and helper invocation with Ruff-preferred multi-line layout.
  • Rewrite batch1 test data into a multi-line list literal for better readability.
  • Condense the write_triples_streaming call into a single line while keeping arguments intact.
  • Keep batch2 in a compact single-line list form while still complying with formatter output.
tests/test_common.py
Standardize Parquet write helper sort_values call formatting.
  • Condense the sort_values call to a single line while preserving arguments and behavior.
src/common.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@S0UGATA S0UGATA merged commit 2c69910 into main Jun 6, 2026
1 check passed

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

2 participants