| Total Complexity | 5 | 
| Total Lines | 27 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | """Base optimizer.""" | ||
| 5 | class BaseOptimizer(object): | ||
| 6 | """Optimizer is object which optimize process.""" | ||
| 7 | |||
| 8 | def __init__(self, process): | ||
| 9 | self.process = process | ||
| 10 | self.ordered_stages = nx.topological_sort(self.process) | ||
| 11 | self.swarm_size = 40 | ||
| 12 | |||
| 13 | def set_custom_optimizing_order(self, ordered_stages): | ||
| 14 | """Set custom order. | ||
| 15 | |||
| 16 | Raises: | ||
| 17 | ValueError: When order doesn't contain all stages. | ||
| 18 | """ | ||
| 19 | if set(self.ordered_stages) == set(ordered_stages) and len( | ||
| 20 | self.ordered_stages) == len(ordered_stages): | ||
| 21 | self.ordered_stages = ordered_stages | ||
| 22 | else: | ||
| 23 |             raise ValueError("List of stages must contain all stages.") | ||
| 24 | |||
| 25 | def optimize_process(self): | ||
| 26 | """Optimize process. | ||
| 27 | |||
| 28 | Raises: | ||
| 29 | NotImplementedError: Abstract method. | ||
| 30 | """ | ||
| 31 | raise NotImplementedError | ||
| 32 | 
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.