Open VoxLight opened 3 weeks ago
.fetch_data could return the instance, instead of the data row. We can still go grab the data if we want it, but having fetch_data return the instance allows us to move it all onto one line? We could also have a flag in the constructor for if we want to init_with_data and call fetch_data inside the constructor. This means it's more flexible and can conform to the different needs.
The syntax the library currently uses is a little gross, we always call .fetch_data when we create the data row. This might allow us to more easily implement configs if we just want to make stencil DataRows and not fill them with any data, but even then you would need to fetch_data to get the column formatting.
Basically, we just need something to help make this syntax nicer: