config.read(self.__path)
return config[self.__profile]
When I print out the return value from this get_config method I get:
<Section: profile pro>
How should I typehint the return value of this method best?
def get_config(self) -> ReturnType: ...
hi, how can I determine exactly what that return type is? "<Section: profile pro>" isn't giving much away. What is that? The "profile pro" part is arbitrary from my application, but "Section" comes from configparser
You'd have to check the docs for configparser
yes, i've already done that. It's unclear to me https://docs.python.org/3/library/configparser.html. (P.S. Sorry, i'm a bit of a Python noob. Bear with me) :-)
Couldn't find a class for section in that module. Try hovering your mouse over the method, see what signature your ide hints for the method, if any.
hmmm, yeah. Nothing from my IDE (PyCharm). I guess it's not too important, thanks anyway
Обсуждают сегодня