I have the following class which produces an error:
class MyClass(object):
QUERIES_AGGS = {
'query3': {
"query": MyClass._make_basic_query,
'aggregations': MyClass._make_query_three_aggregations,
'aggregation_transformations': MyClass._make_query_three_transformations
}
}
@staticmethod
def _make_basic_query():
#some code here
@staticmethod
def _make_query_three_aggregations():
#some code here
@staticmethod
def _make_query_three_transformations(aggs):
#some code here
For now it won't recognize MyClass. If i remove "MyClass" python won't recognize the functions. I know I could move the static methods from inside the class outside as module functions. Is it possible to keep them inside the class and use them like I am trying?
MyClass._make_basic_query, neither the class definition is finished nor the method is defined.