for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"""Contains factory class of process with calls stages."""
from main.model.processes.monotype_process import MonotypeProcess
model
main
main.model.processes.monotype_process
This can be caused by one of the following:
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
# .scrutinizer.yml before_commands: - sudo pip install abc # Python2 - sudo pip3 install abc # Python3
This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.
__init__.py
from main.model.processes.calls_process import CallsProcess
main.model.processes.calls_process
from main.model.stages.calls_stage import CallsStage
main.model.stages.calls_stage
class CallsProcessFactory:
"""Class which produce process with the same type of stages.
Attributes:
structure_type (str): represent type of structure
how_many_nodes (int): how many nodes should be in generated process
process (CallsProcess): process which will be incrementally build
"""
def __init__(self, structure_type, how_many_nodes):
"""Constructor."""
self._stages_to_add = []
self.structure_type = structure_type
self.how_many_nodes = how_many_nodes
self.process = CallsProcess()
def _update_structure(self):
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
if "linear" == self.structure_type:
self.process.add_path(self._stages_to_add)
def _create_stages(self):
for i in range(self.how_many_nodes):
i
self._stages_to_add += CallsStage()
def construct_process(self):
"""Construct process."""
self._create_stages()
self._update_structure()
return self.process