Skip to content

CORE-798: fix pre-commit CI errors#1007

Merged
NoyaArie merged 1 commit into
masterfrom
core-798-fix-pre-commit-ci-errors
May 14, 2026
Merged

CORE-798: fix pre-commit CI errors#1007
NoyaArie merged 1 commit into
masterfrom
core-798-fix-pre-commit-ci-errors

Conversation

@NoyaArie
Copy link
Copy Markdown
Contributor

@NoyaArie NoyaArie commented May 14, 2026

Summary

Fixes all pre-commit hook failures in CI (run-precommit workflow):

  • flake8: Updated from 6.0.0 → 7.1.1 in .pre-commit-config.yaml. The bundled pycodestyle 2.10.0 had known false positives when parsing f-strings — it treated Jinja {{ }} escapes as Python dict literals (E201/E202), text like \"not found in\" as membership tests (E713), and URL colons/SQL commas as missing whitespace (E231/E272). pycodestyle 2.12+ (in flake8 7.1.1) properly handles f-strings.\n- black/isort: Auto-formatted test_microbatch_compiled_code.py\n- sqlfmt: Auto-formatted capture_microbatch_compiled_code.sql and get_compiled_code.sql\n- prettier: Auto-formatted dbt_project.yml\n\nLinear: CORE-798\n\n## Review & Testing Checklist for Human\n\n- [ ] Verify the flake8 7.1.1 upgrade doesn't introduce new lint rules that weren't previously enforced (the .flake8 config ignores remain the same)\n- [ ] Spot-check the auto-formatted files to ensure no semantic changes were introduced\n\n### Notes\n\nAll changes are formatting-only — no logic changes. Pre-commit hooks pass locally on all files."

Link to Devin session: https://app.devin.ai/sessions/98589940b9314e2fa0cf15c730715623
Requested by: @NoyaArie


Open in Devin Review

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated flake8 linter to version 7.1.1.
    • Updated microbatch execution configuration for improved consistency.
  • Refactor

    • Improved code formatting and structure in test modules and macro utilities.

Review Change Stack

- Update flake8 from 6.0.0 to 7.1.1 to fix false positives from
  pycodestyle 2.10.0 mishandling f-strings (E201/E202/E231/E272/E713)
- Apply black/isort formatting to test_microbatch_compiled_code.py
- Apply sqlfmt formatting to 2 SQL macro files
- Apply prettier formatting to dbt_project.yml

Co-Authored-By: Noy Arie <noyarie1992@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@linear
Copy link
Copy Markdown

linear Bot commented May 14, 2026

CORE-798

@github-actions
Copy link
Copy Markdown
Contributor

👋 @NoyaArie
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in the elementary repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3dcd6b81-7b42-445e-93bd-e4404b713e7c

📥 Commits

Reviewing files that changed from the base of the PR and between 8e1fc0b and c5d428b.

📒 Files selected for processing (5)
  • .pre-commit-config.yaml
  • integration_tests/dbt_project/dbt_project.yml
  • integration_tests/tests/test_dbt_artifacts/test_microbatch_compiled_code.py
  • macros/edr/dbt_artifacts/microbatch/capture_microbatch_compiled_code.sql
  • macros/utils/graph/get_compiled_code.sql

📝 Walkthrough

Walkthrough

This pull request applies formatting consistency improvements across test utilities and macro implementations, alongside dependency and configuration updates. The flake8 linter is upgraded and a dbt microbatch execution flag is explicitly enabled, while test helpers and macro code adopt multi-line formatting for improved readability.

Changes

Formatting and Configuration Updates

Layer / File(s) Summary
Dependency and Configuration Updates
.pre-commit-config.yaml, integration_tests/dbt_project/dbt_project.yml
Flake8 hook updated from version 6.0.0 to 7.1.1; dbt microbatch execution strategy flag explicitly set to True.
Test Module Formatting Consistency
integration_tests/tests/test_dbt_artifacts/test_microbatch_compiled_code.py
Multi-line formatting applied to microbatch source SQL templates, context manager path computations, dbt runner invocation, macro file definitions, test decorator arguments, and assertion checks; behavioral logic remains unchanged.
Macro Formatting Refactoring
macros/edr/dbt_artifacts/microbatch/capture_microbatch_compiled_code.sql, macros/utils/graph/get_compiled_code.sql
Macro implementations refactored into multi-line parenthesized and Jinja expressions for the compiled code selection and dispatch formatting calls; conditional logic and return behavior unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A rabbit hops through format clean,
With spaces bold and lines serene,
Dependencies now lean and bright,
Macros dance in multi-line light,
Code finds rhythm, pure delight! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the primary purpose of the PR: fixing pre-commit CI errors through tool updates and formatting corrections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch core-798-fix-pre-commit-ci-errors

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@NoyaArie NoyaArie merged commit ab1a10b into master May 14, 2026
29 of 32 checks passed
@NoyaArie NoyaArie deleted the core-798-fix-pre-commit-ci-errors branch May 14, 2026 07:00
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