Make dependencies() a @staticmethod instead of a @property
This commit is contained in:
parent
5341a066b6
commit
1fa5b50f97
2 changed files with 8 additions and 2 deletions
|
@ -106,8 +106,8 @@ class EventHandler():
|
|||
"""Get the handler functions map."""
|
||||
return self._handler_map
|
||||
|
||||
@property
|
||||
def dependencies(self) -> List[Type['EventHandler']]:
|
||||
@staticmethod
|
||||
def dependencies() -> List[Type['EventHandler']]:
|
||||
"""
|
||||
Get the `EventHandler`s that should also exist along with this current one.
|
||||
|
||||
|
|
|
@ -18,12 +18,14 @@ from collections import defaultdict
|
|||
from typing import Dict
|
||||
from typing import List
|
||||
from typing import Tuple
|
||||
from typing import Type
|
||||
from typing import Union
|
||||
|
||||
from tracetools_read.utils import get_field
|
||||
|
||||
from . import EventHandler
|
||||
from . import EventMetadata
|
||||
from .cpu_time import CpuTimeHandler
|
||||
|
||||
from ..data_model.profile import ProfileDataModel
|
||||
|
||||
|
@ -79,6 +81,10 @@ class ProfileHandler(EventHandler):
|
|||
int('0x7F6CD678D0F8', 16): 'collect_entities',
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def dependencies() -> List[Type[EventHandler]]:
|
||||
return [CpuTimeHandler]
|
||||
|
||||
def get_data_model(self) -> ProfileDataModel:
|
||||
return self._data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue