PluginRequirementFactory¶
-
class
mobase.PluginRequirementFactory¶ Bases:
objectMethods Summary
basic(checker, description)Create a basic requirement.
diagnose(diagnose)Construct a requirement from a diagnose plugin.
gameDependency(**kwds)Helper for @overload to raise when called.
pluginDependency(**kwds)Helper for @overload to raise when called.
Methods Documentation
-
static
basic(checker, description)¶ Create a basic requirement.
- Parameters
checker – The callable to use to check if the requirement is met. Should return True if the requirement is met, False otherwise.
description – The description of the problem, when the requirement is not met.
- Returns
The constructed requirement.
- Return type
-
static
diagnose(diagnose)¶ Construct a requirement from a diagnose plugin.
If the wrapped diagnose plugin reports a problem, the requirement fails and the associated message is the one from the diagnose plugin (or the list of messages if multiple problems were reported).
- Parameters
diagnose – The diagnose plugin to wrap in this requirement.
- Returns
The constructed requirement.
- Return type
-
gameDependency(**kwds)¶ Helper for @overload to raise when called.
-
pluginDependency(**kwds)¶ Helper for @overload to raise when called.
-
static