Is there any way to allow for keyword parameter suggestions when using **kwargs
style function inputs? The closest thing I could think of would be type suggestions in a format such as:
class Classy(object):
var1 = str()
var2 = list()
var3 = list()
def myfunc(param1, **kwargs: **Classy):
# actions
# ...
The purpose or use case of this being IDE code hinting -- expand Jedi's functionality for instance. Is there already any sort of functionality like this in existence?
PEP-484 on arbitrary argument lists and default argument values states that:
More formally it means that you specify the type of one such argument. So if you want all values of the
kwargs
to beClassy
objects, you specify it with: Classy
. Like:This is the adviced way to do it. That of course does not mean an IDE supports this. But if the IDE follows the guidelines, that should be the way to specify it.