Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Resolves ruff/flake8 whitespace violations causing Code Quality Checks workflow failures: trailing whitespace on lines (W291), blank lines with whitespace (W293), and missing newlines at EOF (W292).

Changes

  • Removed trailing whitespace from 128 locations across 7 files
  • Added missing EOF newlines
  • Applied black and isort formatting to maintain consistency with existing code quality standards

Files Modified

  • scrapegraphai/utils/code_error_analysis.py
  • scrapegraphai/utils/code_error_correction.py
  • scrapegraphai/utils/research_web.py
  • scrapegraphai/graphs/markdownify_graph.py
  • scrapegraphai/helpers/models_tokens.py
  • scrapegraphai/models/xai.py
  • scrapegraphai/nodes/markdownify_node.py

All modified files now pass ruff, black, and isort checks. Pre-existing E402 errors in unrelated files remain unchanged.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

The 'Code Quality Checks' workflow fails due to multiple whitespace formatting errors, specifically:

  • W293: Blank line contains whitespace
  • W292: No newline at end of file
  • W291: Trailing whitespace

To fix:

  • Remove trailing whitespace characters from all blank lines in affected files.
  • Ensure every file ends with a single newline (\n) character.
  • Remove trailing whitespace from the end of all lines.

This will address all ruff/flake8 complaints seen in the failing CI run (see: https://github.com/ScrapeGraphAI/Scrapegraph-ai/actions/runs/19911826024) and allow the workflow to pass.

Examples of affected files/lines from the latest failure:

  • scrapegraphai/utils/code_error_analysis.py (lines: 83, 86, 109, 160, 214, 271)
  • scrapegraphai/utils/code_error_correction.py (lines: 63, 66, 290)
  • scrapegraphai/utils/research_web.py (lines: 249, 290, 387)

You may use ruff --fix . or autopep8 --in-place --aggressive --aggressive -r . for bulk correction, or clean manually.

After fixing, verify the 'Code Quality Checks' workflow passes.

This pull request was created as a result of the following prompt from Copilot chat.

The 'Code Quality Checks' workflow fails due to multiple whitespace formatting errors, specifically:

  • W293: Blank line contains whitespace
  • W292: No newline at end of file
  • W291: Trailing whitespace

To fix:

  • Remove trailing whitespace characters from all blank lines in affected files.
  • Ensure every file ends with a single newline (\n) character.
  • Remove trailing whitespace from the end of all lines.

This will address all ruff/flake8 complaints seen in the failing CI run (see: https://github.com/ScrapeGraphAI/Scrapegraph-ai/actions/runs/19911826024) and allow the workflow to pass.

Examples of affected files/lines from the latest failure:

  • scrapegraphai/utils/code_error_analysis.py (lines: 83, 86, 109, 160, 214, 271)
  • scrapegraphai/utils/code_error_correction.py (lines: 63, 66, 290)
  • scrapegraphai/utils/research_web.py (lines: 249, 290, 387)

You may use ruff --fix . or autopep8 --in-place --aggressive --aggressive -r . for bulk correction, or clean manually.

After fixing, verify the 'Code Quality Checks' workflow passes.


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

Copilot AI and others added 2 commits December 3, 2025 23:15
Co-authored-by: VinciGit00 <88108002+VinciGit00@users.noreply.github.com>
Co-authored-by: VinciGit00 <88108002+VinciGit00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix whitespace formatting errors in code quality checks Fix whitespace formatting errors (W291, W292, W293) Dec 3, 2025
Copilot AI requested a review from VinciGit00 December 3, 2025 23:23
Copilot finished work on behalf of VinciGit00 December 3, 2025 23:23
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@VinciGit00 VinciGit00 marked this pull request as ready for review December 3, 2025 23:39
@VinciGit00 VinciGit00 merged commit 5bf7198 into main Dec 3, 2025
9 of 10 checks passed
@VinciGit00 VinciGit00 deleted the copilot/fix-whitespace-formatting-errors branch December 3, 2025 23:39
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

🎉 This PR is included in version 1.64.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

lgtm This PR has been approved by a maintainer released on @stable size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants