for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"""Basic optimizer."""
from networkx import topological_sort
networkx
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
class Optimizer(object):
"""Optimizer is object which optimize process."""
def __init__(self, process):
self.process = process
self.ordered_stages = topological_sort(self.process)
def set_custom_optimizing_order(self, ordered_stages):
"""Set custom order."""
if set(self.ordered_stages) == set(ordered_stages) and len(
self.ordered_stages) == len(ordered_stages):
self.ordered_stages = ordered_stages
else:
raise ValueError("List of stages must contain all stages.")
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__.py
files in your module folders. Make sure that you place one file in each sub-folder.