How to collapse class' methods by default?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I have built a class which is already over 2.5k code lines.
It is extremelly painfull have to scroll a lot once you need something you know it on the bottom.
I have looked after a solution to set the collapse as a default but could not find.
Has anyone found any solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @thales_campolim
Just to clarify, are you referring to working in Databricks, or is this in another IDE or code editor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
hey,
Yes, I am working directly on Databricks notebook.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
It seems like, Databricks notebooks currently do not offer a built in way to collapse all cells.
But you can manually collapse cells, you click on the little triangle on the left of a cell, it collapses that block.
Also, you can split the large class into smaller modules and save them as .py files. Then import them into your notebook using %run or through Databricks Repos if you are working with Git.

