You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the settings for Monster and Victor are only partially set as parameters during instantiation, while several are class or instance attributes. Furthermore, the init method has more than the 5 max parameters recommended by PEP.
I have not refactored yet because it is low priority. One wee detail is that I need to think how best to do this in regards to documentation. I most like will do
something like:
fromtyping_extensionsimportUnpack, TypedDict# Unpack is a 3.10 feature and TypedDict is 3.7 but colab is 3.6classFooOptions(TypedDict):
""" done properly with :param a: etc. """a: intb: strclassBarOptions(FooOptions):
""" done properly with :param c: etc. """c: floatd: boole: Dict[str, int]
classBar:
""" bla bla. """def__init__(self, data: list, **options: Unpack[BarOptions]):
passBarOptions.__doc__+='Options from FooOptions: '+FooOptions.__doc__Bar.__doc__+='Options: '+BarOptions.__doc__
Using the .. autoclass auto-api feature of sphinx in a docstring (if it even works) would require a lot of tweaks as I'd want the inherited members of FooOptions shown, but the TypedDict members. Whereas filling out the RST params entries is not a massive deal.
Hopefully by raising an issue I will get round to fixing it!
The text was updated successfully, but these errors were encountered:
Currently, the settings for Monster and Victor are only partially set as parameters during instantiation, while several are class or instance attributes. Furthermore, the init method has more than the 5 max parameters recommended by PEP.
I have not refactored yet because it is low priority. One wee detail is that I need to think how best to do this in regards to documentation. I most like will do
something like:
Using the
.. autoclass
auto-api feature of sphinx in a docstring (if it even works) would require a lot of tweaks as I'd want the inherited members of FooOptions shown, but the TypedDict members. Whereas filling out the RST params entries is not a massive deal.Hopefully by raising an issue I will get round to fixing it!
The text was updated successfully, but these errors were encountered: