Tool classes

Contents are subject to change.

ToolBase

class ToolBase[source]
configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

BanditTool

class BanditTool(*args, **kwargs)[source]
configure(prospector_config, _)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

DodgyTool

class DodgyTool[source]
run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

FrostedTool

class FrostedTool(*args, **kwargs)[source]
configure(prospector_config, _)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

McCabeTool

class McCabeTool(*args, **kwargs)[source]
configure(prospector_config, _)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

MypyTool

class MypyTool(*args, **kwargs)[source]
configure(prospector_config, _)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

Pep8Tool

class Pep8Tool(*args, **kwargs)[source]
configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(_)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

Pep257Tool

class Pep257Tool(*args, **kwargs)[source]
configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

ProfileValidationTool

class ProfileValidationTool[source]
configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

PyFlakesTool

class PyFlakesTool(*args, **kwargs)[source]
configure(prospector_config, _)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

PylintTool

class PylintTool[source]
combine(messages)[source]

Combine repeated messages.

Some error messages are repeated, causing many errors where only one is strictly necessary.

For example, having a wildcard import will result in one ‘Unused Import’ warning for every unused import. This method will combine these into a single warning.

configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

PyromaTool

class PyromaTool(*args, **kwargs)[source]
configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.

VultureTool

class VultureTool[source]
configure(prospector_config, found_files)[source]

Tools have their own way of being configured from configuration files on the current path - for example, a .pep8rc file. Prospector will use its own configuration settings unless this method discovers some tool-specific configuration that should be used instead.

Returns

A tuple: the first element is a string indicating how or where this tool was configured from. For example, this can be a path to the .pylintrc file used, if used. None means that prospector defaults were used. The second element should be an iterable of Message objects representing any issues which were found when trying to load configuration - for example, bad values in a .pylintrc file. It is also possible to simply return None if neither value is useful.

run(found_files)[source]

Actually run the tool and collect the various messages emitted by the tool. It is expected that this will convert whatever output of the tool into the standard prospector Message and Location objects.