โ01-29-2023 11:04 PM
Hi
does anyone know how to change the default 80 symbols for the line length when executing "Format Python Code" in Databricks notebook?
These days ultra wide monitors are new standards and having 80 line width with breaks to a new line is not usable
โ01-30-2023 12:14 AM
Sadly editor options are only ones in user settings, and nothing is related to that. 80 symbols are related to code readability, not to screen size.
You can send feedback related to the new editor on that link https://databricks.sjc1.qualtrics.com/jfe/form/SV_3wpuprPLlFkVMP4
Look also to pep eight it says:
Limit all lines to a maximum of 79 characters.
For flowing long blocks of text with fewer structural restrictions (docstrings or comments), the line length should be limited to 72 characters.
Limiting the required editor window width makes it possible to have several files open side by side, and works well when using code review tools that present the two versions in adjacent columns.
The default wrapping in most tools disrupts the visual structure of the code, making it more difficult to understand. The limits are chosen to avoid wrapping in editors with the window width set to 80, even if the tool places a marker glyph in the final column when wrapping lines. Some web based tools may not offer dynamic line wrapping at all.
Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the line length limit up to 99 characters, provided that comments and docstrings are still wrapped at 72 characters.
The Python standard library is conservative and requires limiting lines to 79 characters (and docstrings/comments to 72)."
โ02-04-2023 06:56 AM
It's was helpfulโ
โ02-08-2023 11:30 AM
It was helpful โ
โ01-30-2023 12:19 AM
thanks for the answer. I strongly believe it should be customizable to let users decide their preferences.
There are cases where someone would prefer code to be in 1 line rather than 6 lines.
I've sent the feedback to the team
โ02-01-2023 02:07 AM
I don't think you can change it but i recommend you share your feedback in the survey posted by @Hubert Dudekโ
โ02-03-2023 03:34 AM
It may not be possible presently. but would be good to be recommended to Databricks as a feedback.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group