PluginRequirementFactory
- class mobase.PluginRequirementFactory
Bases:
object
Methods 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.
- Return type:
- 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.
- 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).
- Return type:
- Parameters:
diagnose – The diagnose plugin to wrap in this requirement.
- Returns:
The constructed requirement.
- gameDependency(**kwds)
Helper for @overload to raise when called.
- pluginDependency(**kwds)
Helper for @overload to raise when called.