Commit 34ce1a1
Change ruff line-length setting to 120 (#3675)
## 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 <[email protected]>1 parent ddbf610 commit 34ce1a1
File tree
23 files changed
+137
-34
lines changed- acceptance
- bin
- bundle/templates
- default-python
- classic/output/my_default_python/tests
- serverless/output/my_default_python/tests
- lakeflow-pipelines/python/output/my_lakeflow_pipelines/resources/lakeflow_pipelines_etl/transformations
- pipelines
- e2e/output/my_project/transformations
- init
- error-cases/output/my_project/transformations
- python/output/my_python_project/transformations
- experimental/ssh/internal
- client
- server
- libs/template/templates
- cli-pipelines/template/{{.project_name}}/transformations
- default-python/template/{{.project_name}}/tests
- lakeflow-pipelines/template/{{.project_name}}
- resources/{{.project_name_short}}_etl/transformations
- tests
- tools
23 files changed
+137
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
acceptance/pipelines/init/error-cases/output/my_project/transformations/sample_trips_my_project.py
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
acceptance/pipelines/init/error-cases/output/my_project/transformations/sample_zones_my_project.py
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments