Default indentation for Python has changed after migration to the new workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 02:34 AM
In our old workspace default identation was 2 spaces. In our new one it has changed to 4 spaces.
Of course you can manually change it back to 2 spaces as we used to have, but it does not work.
Does anyone know how to solve this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:27 AM
Found one solution. To change identation in every single old notebook which you gonna chnage by selecting edit-> set Python identation.
Still would be nice to make this change for all notebooks at once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2022 01:53 PM
setting it for all notebooks won't be possible as the setting is notebook level. Users might have python/scala/sql/R notebook. So if this has to be set for all notebooks then other notebooks might be affected and would end up in error. So having these settings to notebook level is better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 06:57 AM
You do have that option of Settings --> User Settings (Admin Settings ? not sure - I don't have admin access) --> Notebook Settings --> Default indentation for Python cells (in spaces)
This will change the indentation for newer cells, but existing ones, I am not sure.
Maybe someone from databricks can confirm...
On the other hand if it does change, it will be pain considering it will show up as a change in git history and we will have to push everything again ? Not sure...

