Both mentioned classes have methods called get_json which return the classes __data field. This seems odd for two reasons:
- They don't actually return JSON but a dict (if the typing hints in
__init__ are correct). In any case this is a major source of confusion.
- All other getters are implemented as properties. (So why not just do the same here?)
|
def get_json(self) -> typing.Any: |
|
return self.__data |
|
def get_json(self) -> typing.Any: |
|
return self.__data |
Both mentioned classes have methods called
get_jsonwhich return the classes__datafield. This seems odd for two reasons:__init__are correct). In any case this is a major source of confusion.azure-functions-python-library/azure/functions/_eventgrid.py
Lines 33 to 34 in 44712a7
azure-functions-python-library/azure/functions/_eventgrid.py
Lines 86 to 87 in 44712a7