Skip to content

Change ruff line-length setting to 120 - #3675

Merged
lennartkats-db merged 4 commits into
mainfrom
ruff-120
Sep 30, 2025
Merged

Change ruff line-length setting to 120#3675
lennartkats-db merged 4 commits into
mainfrom
ruff-120

Conversation

@lennartkats-db

Copy link
Copy Markdown
Contributor

Changes

This changes the ruff formatter line-length from 150 to 120.

Why 120

  • PEP8 line length is 79 ← this is extremely tight
  • Black and Ruff default line length is 88 ← this is good since it's a tooling default but, still rather tight
  • Current line length was 150 to balance line length vs. spreading code over many lines
  • The workspace formatter defaults to 120 ← this seems like a sweet spot for us; it means our templates by default use the same setting as the workspace

Note that for IDE support of our templates, we could set a tool.black section as done in https://github.com/databricks/cli/pull/3671/files?w=1#diff-ed1a9755eebbb3b630edc93a5731f9dd8caa66b9967f9a57234c6ce9bde88c33R25-R26. Doing that is out of scope for the present PR.

Tests

Standard acceptance tests.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

Run: 18126053538

Env✅​pass🔄​flaky🙈​skip
✅​aws linux315531
✅​aws windows316530
🔄​aws-ucws linux4226428
🔄​aws-ucws windows4236427
✅​azure linux315530
✅​azure windows316529
🔄​azure-ucws linux4271427
✅​azure-ucws windows429426
✅​gcp linux314532
✅​gcp windows315531
11 failing tests:
Test Nameaws-ucws linuxaws-ucws windowsazure-ucws linux
TestAccept✅​pass🔄​flaky✅​pass
TestAccept/bundle/deploy/dashboard/nested-folders🔄​flaky✅​pass✅​pass
TestAccept/bundle/deployment/bind/dashboard🔄​flaky✅​pass✅​pass
TestAccept/bundle/deployment/bind/dashboard/recreation🔄​flaky✅​pass✅​pass
TestAccept/bundle/resources/pipelines/update✅​pass🔄​flaky✅​pass
TestAccept/bundle/resources/pipelines/update/DATABRICKS_BUNDLE_ENGINE=terraform✅​pass🔄​flaky✅​pass
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=no/PY=yes🔄​flaky✅​pass✅​pass
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=no/PY=no🔄​flaky✅​pass✅​pass
TestDashboardAssumptions_WorkspaceImport🔄​flaky🔄​flaky🔄​flaky
TestFsCpFileToDir✅​pass🔄​flaky✅​pass
TestFsCpFileToDir/uc-volumes_to_uc-volumes✅​pass🔄​flaky✅​pass

@lennartkats-dblennartkats-db changed the title Change ruff line-length setting to 120[WIP] Change ruff line-length setting to 120Sep 29, 2025
lennartkats-dband others added 2 commits September 29, 2025 16:57
Resolve merge conflicts in Python template files by adopting single-line formatting
with f-strings from main branch to align with 120-character line length goal.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@lennartkats-dblennartkats-db changed the title [WIP] Change ruff line-length setting to 120Change ruff line-length setting to 120Sep 30, 2025
@lennartkats-db
lennartkats-db added this pull request to the merge queueSep 30, 2025
Merged via the queue into main with commit 34ce1a1Sep 30, 2025
13 checks passed
@lennartkats-db
lennartkats-db deleted the ruff-120 branch September 30, 2025 10:46
github-merge-queueBot pushed a commit that referenced this pull request Jan 12, 2026
## Changes
This switches the code formatter to ruff and sets the line length to 120
a described in #3675.
## Why
* ruff mindshare, performance, and ability to combine linting and
formatting
## Tests
* Standard acceptance tests
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
This changes the ruff formatter line-length from 150 to 120.
## Why 120
* PEP8 line length is 79 ← _this is extremely tight_
* Black and Ruff default line length is 88 ← _this is good since it's a
tooling default but, still rather tight_
* Current line length was 150 to balance line length vs. spreading code
over many lines
* The [workspace
formatter](https://docs.databricks.com/aws/en/notebooks/notebooks-code#python-black-formatter-library)
defaults to 120 ← _this seems like a sweet spot for us; it means our
templates by default use the same setting as the workspace_
Note that for IDE support of our templates, we could set a `tool.black`
section as done in
https://github.com/databricks/cli/pull/3671/files?w=1#diff-ed1a9755eebbb3b630edc93a5731f9dd8caa66b9967f9a57234c6ce9bde88c33R25-R26.
Doing that is out of scope for the present PR.
## Tests
Standard acceptance tests.
---------
Co-authored-by: Claude <noreply@anthropic.com>
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
This switches the code formatter to ruff and sets the line length to 120
a described in #3675.
## Why
* ruff mindshare, performance, and ability to combine linting and
formatting
## Tests
* Standard acceptance tests
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for freeto 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

@lennartkats-db@eng-dev-ecosystem-bot@shreyas-goenka