Tool classes¶
Contents are subject to change.
ToolBase
¶
-
class
ToolBase
[source]¶ -
abstract
configure
(prospector_config, found_files) → Tuple[str, Optional[Iterable[prospector.message.Message]]][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.
-
abstract
BanditTool
¶
DodgyTool
¶
-
class
DodgyTool
[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.
-
FrostedTool
¶
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.
-
MypyTool
¶
PycodestyleTool
¶
-
class
PycodestyleTool
(*args, **kwargs)[source]¶ -
configure
(prospector_config, found_files: prospector.finder.FileFinder)[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.
-
PydocstyleTool
¶
-
class
PydocstyleTool
(*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.
-
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.
-
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.
-
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: prospector.finder.FileFinder)[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.
-