As in, if there are multiple formats for a table, but those formats share some set of methods, we should generate a method on the enum that forwards the call to each of those variants.
We could also get fancier here and generate methods on the wrapper even when only one variant has the method, and make it return None? But that feels like it could get noisy. In that case, we could consider adding an annotation that would be added to specific methods on a variant which would cause us to generate a a method call on the enum (e.g. make this opt-in, in the case where not all variants have a method)
see #682 for an example of the code this would save us hand-writing.
I suggest we start with only the case where all variants support; the user having to drill down to the specific variant seems pretty reasonable when that's not the case.
As in, if there are multiple formats for a table, but those formats share some set of methods, we should generate a method on the enum that forwards the call to each of those variants.
We could also get fancier here and generate methods on the wrapper even when only one variant has the method, and make it return
None
? But that feels like it could get noisy. In that case, we could consider adding an annotation that would be added to specific methods on a variant which would cause us to generate a a method call on the enum (e.g. make this opt-in, in the case where not all variants have a method)see #682 for an example of the code this would save us hand-writing.