IPluginDiagnose

class mobase.IPluginDiagnose

Bases: IPlugin

Plugins that create problem reports to be displayed in the UI.

This can be used to report problems related to the same plugin (which implements further interfaces) or as a stand-alone diagnosis tool.

Methods Summary

activeProblems()

Retrieve the list of active problems found by this plugin.

fullDescription(key)

Retrieve the full description of the problem corresponding to the given key.

hasGuidedFix(key)

Check if the problem corresponding to the given key has a guided fix.

shortDescription(key)

Retrieve the short description of the problem corresponding to the given key.

startGuidedFix(key)

Starts a guided fix for the problem corresponding to the given key.

Methods Documentation

abstract activeProblems()

Retrieve the list of active problems found by this plugin.

This method returns a list of problem IDs, that are then used when calling other methods such as shortDescription() or hasGuidedFix().

Return type:

List[int]

Returns:

The list of active problems for this plugin.

abstract fullDescription(key)

Retrieve the full description of the problem corresponding to the given key.

Return type:

str

Parameters:

key – ID of the problem.

Returns:

The full description of the problem.

Raises:

IndexError – If the key is not valid.

abstract hasGuidedFix(key)

Check if the problem corresponding to the given key has a guided fix.

Return type:

bool

Parameters:

key – ID of the problem.

Returns:

True if there is a guided fix for the problem, False otherwise.

Raises:

IndexError – If the key is not valid.

abstract shortDescription(key)

Retrieve the short description of the problem corresponding to the given key.

Return type:

str

Parameters:

key – ID of the problem.

Returns:

The short description of the problem.

Raises:

IndexError – If the key is not valid.

abstract startGuidedFix(key)

Starts a guided fix for the problem corresponding to the given key.

This method should throw ValueError if there is no guided fix for the corresponding problem.

Return type:

None

Parameters:

key – ID of the problem.

Raises:
  • IndexError – If the key is not valid.

  • ValueError – If there is no guided fix for this problem.