Skip to content
Snippets Groups Projects
Commit bd0bcf4f authored by Jammer, Tim's avatar Jammer, Tim
Browse files

Make all Methods of MPICallFactory static

parent 72a5b76b
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,8 @@ import json
from scripts.Infrastructure.MPIAPIInfo.MPIAPIParameters import get_mpi_version_dict
template = """
def @{FUNC_KEY}@(self, *args):
@staticmethod
def @{FUNC_KEY}@(*args):
return MPI_Call("@{FUNC_NAME}@", OrderedDict(@{PARAM_DICT}@), "@{VERSION}@")
"""
......@@ -18,8 +19,9 @@ from scripts.Infrastructure.MPICall import MPI_Call
class MPICallFactory:
def get(self, func: str, *args):
f_to_call = getattr(self, func)
@staticmethod
def get(func: str, *args):
f_to_call = getattr(MPICallFactory, func)
return f_to_call(*args)
"""
......@@ -30,13 +32,15 @@ from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory
class CorrectMPICallFactory:
def get(self, func: str):
f_to_call = getattr(self, func)
@staticmethod
def get(func: str):
f_to_call = getattr(CorrectMPICallFactory, func)
return f_to_call()
"""
template_correct = """
def @{FUNC_KEY}@(self):
@staticmethod
def @{FUNC_KEY}@():
correct_params = CorrectParameterFactory()
return MPICallFactory().@{FUNC_KEY}@(@{PARAMS}@)
"""
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment