mirror of
https://github.com/ModOrganizer2/pystubs-generation.git
synced 2026-07-27 14:07:13 -07:00
Update configuration for 2.4.0a4.
This commit is contained in:
+148
-39
@@ -1499,6 +1499,18 @@ mobase:
|
||||
name_suggestion: Suggested name for this mod. This can still be changed by the user.
|
||||
returns: An interface to the new installed mod, or `None` if no installation took place (canceled or failure).
|
||||
|
||||
isPluginEnabled.1:
|
||||
__doc__: Check if a plugin is enabled.
|
||||
args:
|
||||
plugin: The plugin to check.
|
||||
returns: True if the plugin is enabled, False otherwise.
|
||||
|
||||
isPluginEnabled.2:
|
||||
__doc__: Check if a plugin is enabled.
|
||||
args:
|
||||
plugin: The name of the plugin to check.
|
||||
returns: True if the plugin is enabled, False otherwise.
|
||||
|
||||
listDirectories:
|
||||
__doc__: Retrieve the list of (virtual) subdirectories in the given path.
|
||||
args:
|
||||
@@ -1539,6 +1551,36 @@ mobase:
|
||||
path to the application, and the second parameter is the exit code of the application.
|
||||
returns: True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
|
||||
onPluginDisabled.1:
|
||||
__doc__: Install a new handler to be called when a plugin is disabled.
|
||||
args:
|
||||
callback: |
|
||||
The function to call when a plugin is disabled. The parameter is the plugin being disabled.
|
||||
returns: True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
|
||||
onPluginDisabled.2:
|
||||
__doc__: Install a new handler to be called when the given plugin is disabled.
|
||||
args:
|
||||
name: Name of the plugin to watch.
|
||||
callback: |
|
||||
The function to call when the plugin is disabled.
|
||||
returns: True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
|
||||
onPluginEnabled.1:
|
||||
__doc__: Install a new handler to be called when a plugin is enabled.
|
||||
args:
|
||||
callback: |
|
||||
The function to call when a plugin is enabled. The parameter is the plugin being enabled.
|
||||
returns: True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
|
||||
onPluginEnabled.2:
|
||||
__doc__: Install a new handler to be called when the given plugin is enabled.
|
||||
args:
|
||||
name: Name of the plugin to watch.
|
||||
callback: |
|
||||
The function to call when the plugin is enabled.
|
||||
returns: True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
|
||||
onPluginSettingChanged:
|
||||
__doc__: Install a new handler to be called when a plugin setting is changed.
|
||||
args:
|
||||
@@ -1758,14 +1800,6 @@ mobase:
|
||||
organizer: The main organizer interface.
|
||||
returns: True if the plugin was initialized correctly, False otherwise.
|
||||
|
||||
isActive:
|
||||
__doc__: |
|
||||
Check if this plugin is active.
|
||||
|
||||
It is possible to use a plugin setting (specified in `settings()`) here to allow
|
||||
users to manually enable/disable a plugin.
|
||||
returns: True if this plugin is active, False otherwise.
|
||||
|
||||
name:
|
||||
__doc__: |
|
||||
Retrieve the name of the plugin.
|
||||
@@ -1804,6 +1838,13 @@ mobase:
|
||||
returns: |
|
||||
The master plugin of this plugin, or a null pointer if this plugin does not have a master.
|
||||
|
||||
requirements:
|
||||
__doc__: |
|
||||
Retrieve the requirements for this plugin.
|
||||
|
||||
This method is called right after `init()` and the ownership the requirements is
|
||||
returns: The list of requirements for this plugin.
|
||||
|
||||
settings:
|
||||
returns: A list of settings for this plugin.
|
||||
|
||||
@@ -1994,6 +2035,12 @@ mobase:
|
||||
isInstalled:
|
||||
returns: True if this game has been discovered as installed, False otherwise.
|
||||
|
||||
listSaves:
|
||||
__doc__: List saves in the given directory.
|
||||
args:
|
||||
folder: The folder to list saves from.
|
||||
returns: The list of game saves in the given folder.
|
||||
|
||||
loadOrderMechanism:
|
||||
returns: The load order mechanism used by this game.
|
||||
|
||||
@@ -2029,13 +2076,6 @@ mobase:
|
||||
as a primary source for the game so that it is not flagged as an alternative one.
|
||||
returns: The list of primary alternative 'short' names for this game, or an empty list.
|
||||
|
||||
savegameExtension:
|
||||
__doc__:
|
||||
returns: The file extension of save games for this game.
|
||||
|
||||
savegameSEExtension:
|
||||
returns: The file extension of Script Extender saves for this game.
|
||||
|
||||
savesDirectory:
|
||||
returns: The directory where save games are stored.
|
||||
|
||||
@@ -2417,6 +2457,89 @@ mobase:
|
||||
supportedExtensions:
|
||||
returns: The list of file extensions that are supported by this preview plugin.
|
||||
|
||||
IPluginRequirement:
|
||||
__doc__: Class representing requirements for plugins.
|
||||
|
||||
Problem:
|
||||
__doc__: Class representing a problem found by a requirement.
|
||||
|
||||
__init__:
|
||||
args:
|
||||
short_description: Short description of the problem.
|
||||
long_description: Long description of the problem.
|
||||
|
||||
shortDescription:
|
||||
returns: A short description of the problem.
|
||||
|
||||
longDescription:
|
||||
returns: A long description of the problem.
|
||||
|
||||
check:
|
||||
__doc__: Check if the requirement is met, and return a problem if not.
|
||||
args:
|
||||
organizer: The IOrganizer instance.
|
||||
returns: The problem found if the requirement is not met, otherwise None.
|
||||
|
||||
PluginRequirementFactory:
|
||||
__doc__:
|
||||
|
||||
basic:
|
||||
__doc__: Create a basic requirement.
|
||||
args:
|
||||
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.
|
||||
|
||||
diagnose:
|
||||
__doc__: |
|
||||
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).
|
||||
args:
|
||||
diagnose: The diagnose plugin to wrap in this requirement.
|
||||
returns: The constructed requirement.
|
||||
|
||||
gameDependency.1:
|
||||
__doc__: |
|
||||
Create a new game dependency requirement.
|
||||
|
||||
The requirement is met when the managed game is one of the specified game.
|
||||
args:
|
||||
games: The names of the required games.
|
||||
returns: The constructed requirement.
|
||||
|
||||
gameDependency.2:
|
||||
__doc__: |
|
||||
Create a new game dependency requirement.
|
||||
|
||||
The requirement is met when the managed game is the specified game.
|
||||
args:
|
||||
game: The name of the required game.
|
||||
returns: The constructed requirement.
|
||||
|
||||
pluginDependency.1:
|
||||
__doc__: |
|
||||
Create a new plugin dependency requirement.
|
||||
|
||||
The requirement is met when one of the specified plugins is enabled.
|
||||
args:
|
||||
plugins: The name of the plugins.
|
||||
returns: The constructed requirement.
|
||||
|
||||
pluginDependency.2:
|
||||
__doc__: |
|
||||
Create a new plugin dependency requirement.
|
||||
|
||||
The requirement is met when the specified plugin is enabled.
|
||||
args:
|
||||
plugin: The name of the plugin that must be enabled.
|
||||
returns: The constructed requirement.
|
||||
|
||||
|
||||
IPluginTool:
|
||||
__doc__: |
|
||||
This is the simplest of plugin interfaces. Such plugins simply place an icon inside the tools submenu
|
||||
@@ -2498,8 +2621,11 @@ mobase:
|
||||
the file containing the save.
|
||||
returns: The creation time of the save.
|
||||
|
||||
getFilename:
|
||||
returns: The name of the (main) save file.
|
||||
getFilepath:
|
||||
returns: The path name to the (main) file or folder for the save.
|
||||
|
||||
getName:
|
||||
returns: The name of this save, for display purpose.
|
||||
|
||||
getSaveGroupIdentifier:
|
||||
__doc__: |
|
||||
@@ -2509,9 +2635,6 @@ mobase:
|
||||
RPG games, this is usually the name of a character.
|
||||
returns: The group identifier for this save game.
|
||||
|
||||
hasScriptExtenderFile:
|
||||
returns: True if this save game has an associated script extender save, False otherwise.
|
||||
|
||||
ISaveGameInfoWidget:
|
||||
__doc__: Base class for a save game info widget.
|
||||
# Class not abstract because it conflicts with Qt metaclass:
|
||||
@@ -2525,7 +2648,7 @@ mobase:
|
||||
abstract: true
|
||||
__doc__: Set the save file to display in this widget.
|
||||
args:
|
||||
save: Path to the save file.
|
||||
save: The save to display in the widget
|
||||
|
||||
LocalSavegames:
|
||||
__doc__:
|
||||
@@ -2811,16 +2934,10 @@ mobase:
|
||||
getMissingAssets:
|
||||
__doc__: Retrieve missing assets from the save.
|
||||
args:
|
||||
filepath: Path to the save file.
|
||||
filepath: The save to find missing assets for.
|
||||
returns: |
|
||||
A collection of missing assets and the modules that can supply those assets.
|
||||
|
||||
getSaveGameInfo:
|
||||
__doc__: Retrieve the information about the supplied save game.
|
||||
args:
|
||||
filepath: Path to the save file.
|
||||
returns: A SaveGame corresponding to the given save file.
|
||||
|
||||
getSaveGameWidget:
|
||||
__doc__: |
|
||||
Retrieve a widget to display over the save game list.
|
||||
@@ -2832,13 +2949,6 @@ mobase:
|
||||
__doc__: A SaveGameInfoWidget to display information about save game.
|
||||
type: Optional["ISaveGameInfoWidget"]
|
||||
|
||||
hasScriptExtenderSave:
|
||||
__doc__: Check whether or not the save has a paired script extender save.
|
||||
args:
|
||||
filepath: Path to the save file.
|
||||
returns: |
|
||||
True if the given save file has a paired script extender save, False otherwise.
|
||||
|
||||
ScriptExtender:
|
||||
__doc__:
|
||||
__abstract__: true
|
||||
@@ -2871,10 +2981,9 @@ mobase:
|
||||
__doc__:
|
||||
returns: The fullpath to the script extender loader.
|
||||
|
||||
# TODO: Remove this? Deprecated?
|
||||
saveGameAttachmentExtensions:
|
||||
__doc__:
|
||||
returns: Additional savegame attachments.
|
||||
savegameExtension:
|
||||
__doc__: Retrieve the extension of script extender save files.
|
||||
returns: The extension of script extender save files (e.g. "skse").
|
||||
|
||||
UnmanagedMods:
|
||||
__doc__:
|
||||
|
||||
+241
-67
@@ -464,7 +464,7 @@ class GuessedString:
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def __init__(self, value: str, quality: "GuessQuality"):
|
||||
def __init__(self, value: str, quality: "GuessQuality" = GuessQuality.USER):
|
||||
"""
|
||||
Creates a GuessedString with the given value and quality.
|
||||
|
||||
@@ -1846,6 +1846,30 @@ class IOrganizer:
|
||||
An interface to the new installed mod, or `None` if no installation took place (canceled or failure).
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def isPluginEnabled(self, plugin: "IPlugin") -> bool:
|
||||
"""
|
||||
Check if a plugin is enabled.
|
||||
|
||||
Args:
|
||||
plugin: The plugin to check.
|
||||
|
||||
Returns:
|
||||
True if the plugin is enabled, False otherwise.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def isPluginEnabled(self, plugin: str) -> bool:
|
||||
"""
|
||||
Check if a plugin is enabled.
|
||||
|
||||
Args:
|
||||
plugin: The name of the plugin to check.
|
||||
|
||||
Returns:
|
||||
True if the plugin is enabled, False otherwise.
|
||||
"""
|
||||
...
|
||||
def listDirectories(self, directory: str) -> List[str]:
|
||||
"""
|
||||
Retrieve the list of (virtual) subdirectories in the given path.
|
||||
@@ -1910,6 +1934,44 @@ class IOrganizer:
|
||||
True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginDisabled(self, callback: Callable[["IPlugin"], None]):
|
||||
"""
|
||||
Install a new handler to be called when a plugin is disabled.
|
||||
|
||||
Args:
|
||||
callback: The function to call when a plugin is disabled. The parameter is the plugin being disabled.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginDisabled(self, name: str, callback: Callable[[], None]):
|
||||
"""
|
||||
Install a new handler to be called when the given plugin is disabled.
|
||||
|
||||
Args:
|
||||
name: Name of the plugin to watch.
|
||||
callback: The function to call when the plugin is disabled.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginEnabled(self, callback: Callable[["IPlugin"], None]):
|
||||
"""
|
||||
Install a new handler to be called when a plugin is enabled.
|
||||
|
||||
Args:
|
||||
callback: The function to call when a plugin is enabled. The parameter is the plugin being enabled.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginEnabled(self, name: str, callback: Callable[[], None]):
|
||||
"""
|
||||
Install a new handler to be called when the given plugin is enabled.
|
||||
|
||||
Args:
|
||||
name: Name of the plugin to watch.
|
||||
callback: The function to call when the plugin is enabled.
|
||||
"""
|
||||
...
|
||||
def onPluginSettingChanged(
|
||||
self, callback: Callable[[str, str, MoVariant, MoVariant], None]
|
||||
) -> bool:
|
||||
@@ -2211,18 +2273,6 @@ class IPlugin(abc.ABC):
|
||||
True if the plugin was initialized correctly, False otherwise.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def isActive(self) -> bool:
|
||||
"""
|
||||
Check if this plugin is active.
|
||||
|
||||
It is possible to use a plugin setting (specified in `settings()`) here to allow
|
||||
users to manually enable/disable a plugin.
|
||||
|
||||
Returns:
|
||||
True if this plugin is active, False otherwise.
|
||||
"""
|
||||
...
|
||||
def localizedName(self) -> str:
|
||||
"""
|
||||
Retrieve the localized name of the plugin.
|
||||
@@ -2234,7 +2284,7 @@ class IPlugin(abc.ABC):
|
||||
The localized name of the plugin.
|
||||
"""
|
||||
...
|
||||
def master(self) -> "IPlugin":
|
||||
def master(self) -> str:
|
||||
"""
|
||||
Retrieve the master plugin of this plugin.
|
||||
|
||||
@@ -2265,6 +2315,17 @@ class IPlugin(abc.ABC):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def requirements(self) -> List["IPluginRequirement"]:
|
||||
"""
|
||||
Retrieve the requirements for this plugin.
|
||||
|
||||
This method is called right after `init()` and the ownership the requirements is
|
||||
|
||||
Returns:
|
||||
The list of requirements for this plugin.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def settings(self) -> List["PluginSetting"]:
|
||||
"""
|
||||
Returns:
|
||||
@@ -2577,6 +2638,18 @@ class IPluginGame(IPlugin):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def listSaves(self, folder: PyQt5.QtCore.QDir) -> List["ISaveGame"]:
|
||||
"""
|
||||
List saves in the given directory.
|
||||
|
||||
Args:
|
||||
folder: The folder to list saves from.
|
||||
|
||||
Returns:
|
||||
The list of game saves in the given folder.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def loadOrderMechanism(self) -> "LoadOrderMechanism":
|
||||
"""
|
||||
Returns:
|
||||
@@ -2638,20 +2711,6 @@ class IPluginGame(IPlugin):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def savegameExtension(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The file extension of save games for this game.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def savegameSEExtension(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The file extension of Script Extender saves for this game.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def savesDirectory(self) -> PyQt5.QtCore.QDir:
|
||||
"""
|
||||
Returns:
|
||||
@@ -3009,7 +3068,7 @@ class IPluginList:
|
||||
True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
"""
|
||||
...
|
||||
def onRefreshed(self, callback: Callable[[None], None]) -> bool:
|
||||
def onRefreshed(self, callback: Callable[[], None]) -> bool:
|
||||
"""
|
||||
Install a new handler to be called when the list of plugins is refreshed.
|
||||
|
||||
@@ -3200,6 +3259,48 @@ class IPluginPreview(IPlugin):
|
||||
"""
|
||||
...
|
||||
|
||||
class IPluginRequirement:
|
||||
"""
|
||||
Class representing requirements for plugins.
|
||||
"""
|
||||
|
||||
class Problem:
|
||||
"""
|
||||
Class representing a problem found by a requirement.
|
||||
"""
|
||||
|
||||
def __init__(self, short_description: str, long_description: str = ""):
|
||||
"""
|
||||
Args:
|
||||
short_description: Short description of the problem.
|
||||
long_description: Long description of the problem.
|
||||
"""
|
||||
...
|
||||
def longDescription(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
A long description of the problem.
|
||||
"""
|
||||
...
|
||||
def shortDescription(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
A short description of the problem.
|
||||
"""
|
||||
...
|
||||
def __init__(self): ...
|
||||
def check(self, organizer: "IOrganizer") -> Optional["IPluginRequirement.Problem"]:
|
||||
"""
|
||||
Check if the requirement is met, and return a problem if not.
|
||||
|
||||
Args:
|
||||
organizer: The IOrganizer instance.
|
||||
|
||||
Returns:
|
||||
The problem found if the requirement is not met, otherwise None.
|
||||
"""
|
||||
...
|
||||
|
||||
class IPluginTool(IPlugin):
|
||||
"""
|
||||
This is the simplest of plugin interfaces. Such plugins simply place an icon inside the tools submenu
|
||||
@@ -3332,10 +3433,16 @@ class ISaveGame:
|
||||
The creation time of the save.
|
||||
"""
|
||||
...
|
||||
def getFilename(self) -> str:
|
||||
def getFilepath(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The name of the (main) save file.
|
||||
The path name to the (main) file or folder for the save.
|
||||
"""
|
||||
...
|
||||
def getName(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The name of this save, for display purpose.
|
||||
"""
|
||||
...
|
||||
def getSaveGroupIdentifier(self) -> str:
|
||||
@@ -3349,12 +3456,6 @@ class ISaveGame:
|
||||
The group identifier for this save game.
|
||||
"""
|
||||
...
|
||||
def hasScriptExtenderFile(self) -> bool:
|
||||
"""
|
||||
Returns:
|
||||
True if this save game has an associated script extender save, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
class ISaveGameInfoWidget(PyQt5.QtWidgets.QWidget):
|
||||
"""
|
||||
@@ -3374,12 +3475,12 @@ class ISaveGameInfoWidget(PyQt5.QtWidgets.QWidget):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def setSave(self, save: str):
|
||||
def setSave(self, save: "ISaveGame"):
|
||||
"""
|
||||
Set the save file to display in this widget.
|
||||
|
||||
Args:
|
||||
save: Path to the save file.
|
||||
save: The save to display in the widget
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -3657,6 +3758,101 @@ class ModRepositoryFileInfo:
|
||||
@staticmethod
|
||||
def createFromJson(data: str) -> "ModRepositoryFileInfo": ...
|
||||
|
||||
class PluginRequirementFactory:
|
||||
def __init__(self): ...
|
||||
@staticmethod
|
||||
def basic(
|
||||
checker: Callable[["IOrganizer"], bool], description: str
|
||||
) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a basic requirement.
|
||||
|
||||
Args:
|
||||
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.
|
||||
"""
|
||||
...
|
||||
@staticmethod
|
||||
def diagnose(diagnose: "IPluginDiagnose") -> "IPluginRequirement":
|
||||
"""
|
||||
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).
|
||||
|
||||
Args:
|
||||
diagnose: The diagnose plugin to wrap in this requirement.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def gameDependency(games: List[str]) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new game dependency requirement.
|
||||
|
||||
The requirement is met when the managed game is one of the specified game.
|
||||
|
||||
Args:
|
||||
games: The names of the required games.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def gameDependency(game: str) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new game dependency requirement.
|
||||
|
||||
The requirement is met when the managed game is the specified game.
|
||||
|
||||
Args:
|
||||
game: The name of the required game.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def pluginDependency(plugins: List[str]) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new plugin dependency requirement.
|
||||
|
||||
The requirement is met when one of the specified plugins is enabled.
|
||||
|
||||
Args:
|
||||
plugins: The name of the plugins.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def pluginDependency(plugin: str) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new plugin dependency requirement.
|
||||
|
||||
The requirement is met when the specified plugin is enabled.
|
||||
|
||||
Args:
|
||||
plugin: The name of the plugin that must be enabled.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
|
||||
class PluginSetting:
|
||||
"""
|
||||
Class to hold the user-configurable parameters a plugin accepts. The purpose of this class is
|
||||
@@ -3691,30 +3887,18 @@ class SaveGameInfo(abc.ABC):
|
||||
|
||||
def __init__(self): ...
|
||||
@abc.abstractmethod
|
||||
def getMissingAssets(self, filepath: str) -> Dict[str, List[str]]:
|
||||
def getMissingAssets(self, filepath: "ISaveGame") -> Dict[str, List[str]]:
|
||||
"""
|
||||
Retrieve missing assets from the save.
|
||||
|
||||
Args:
|
||||
filepath: Path to the save file.
|
||||
filepath: The save to find missing assets for.
|
||||
|
||||
Returns:
|
||||
A collection of missing assets and the modules that can supply those assets.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def getSaveGameInfo(self, filepath: str) -> "ISaveGame":
|
||||
"""
|
||||
Retrieve the information about the supplied save game.
|
||||
|
||||
Args:
|
||||
filepath: Path to the save file.
|
||||
|
||||
Returns:
|
||||
A SaveGame corresponding to the given save file.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def getSaveGameWidget(
|
||||
self, parent: PyQt5.QtWidgets.QWidget
|
||||
) -> Optional["ISaveGameInfoWidget"]:
|
||||
@@ -3730,18 +3914,6 @@ class SaveGameInfo(abc.ABC):
|
||||
A SaveGameInfoWidget to display information about save game.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def hasScriptExtenderSave(self, filepath: str) -> bool:
|
||||
"""
|
||||
Check whether or not the save has a paired script extender save.
|
||||
|
||||
Args:
|
||||
filepath: Path to the save file.
|
||||
|
||||
Returns:
|
||||
True if the given save file has a paired script extender save, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
class ScriptExtender(abc.ABC):
|
||||
def __init__(self): ...
|
||||
@@ -3795,10 +3967,12 @@ class ScriptExtender(abc.ABC):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def saveGameAttachmentExtensions(self) -> List[str]:
|
||||
def savegameExtension(self) -> str:
|
||||
"""
|
||||
Retrieve the extension of script extender save files.
|
||||
|
||||
Returns:
|
||||
Additional savegame attachments.
|
||||
The extension of script extender save files (e.g. "skse").
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@ class GuessedString:
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def __init__(self, value: str, quality: "GuessQuality"):
|
||||
def __init__(self, value: str, quality: "GuessQuality" = GuessQuality.USER):
|
||||
"""
|
||||
Creates a GuessedString with the given value and quality.
|
||||
|
||||
@@ -1846,6 +1846,30 @@ class IOrganizer:
|
||||
An interface to the new installed mod, or `None` if no installation took place (canceled or failure).
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def isPluginEnabled(self, plugin: "IPlugin") -> bool:
|
||||
"""
|
||||
Check if a plugin is enabled.
|
||||
|
||||
Args:
|
||||
plugin: The plugin to check.
|
||||
|
||||
Returns:
|
||||
True if the plugin is enabled, False otherwise.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def isPluginEnabled(self, plugin: str) -> bool:
|
||||
"""
|
||||
Check if a plugin is enabled.
|
||||
|
||||
Args:
|
||||
plugin: The name of the plugin to check.
|
||||
|
||||
Returns:
|
||||
True if the plugin is enabled, False otherwise.
|
||||
"""
|
||||
...
|
||||
def listDirectories(self, directory: str) -> List[str]:
|
||||
"""
|
||||
Retrieve the list of (virtual) subdirectories in the given path.
|
||||
@@ -1910,6 +1934,44 @@ class IOrganizer:
|
||||
True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginDisabled(self, callback: Callable[["IPlugin"], None]):
|
||||
"""
|
||||
Install a new handler to be called when a plugin is disabled.
|
||||
|
||||
Args:
|
||||
callback: The function to call when a plugin is disabled. The parameter is the plugin being disabled.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginDisabled(self, name: str, callback: Callable[[], None]):
|
||||
"""
|
||||
Install a new handler to be called when the given plugin is disabled.
|
||||
|
||||
Args:
|
||||
name: Name of the plugin to watch.
|
||||
callback: The function to call when the plugin is disabled.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginEnabled(self, callback: Callable[["IPlugin"], None]):
|
||||
"""
|
||||
Install a new handler to be called when a plugin is enabled.
|
||||
|
||||
Args:
|
||||
callback: The function to call when a plugin is enabled. The parameter is the plugin being enabled.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
def onPluginEnabled(self, name: str, callback: Callable[[], None]):
|
||||
"""
|
||||
Install a new handler to be called when the given plugin is enabled.
|
||||
|
||||
Args:
|
||||
name: Name of the plugin to watch.
|
||||
callback: The function to call when the plugin is enabled.
|
||||
"""
|
||||
...
|
||||
def onPluginSettingChanged(
|
||||
self, callback: Callable[[str, str, MoVariant, MoVariant], None]
|
||||
) -> bool:
|
||||
@@ -2211,18 +2273,6 @@ class IPlugin(abc.ABC):
|
||||
True if the plugin was initialized correctly, False otherwise.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def isActive(self) -> bool:
|
||||
"""
|
||||
Check if this plugin is active.
|
||||
|
||||
It is possible to use a plugin setting (specified in `settings()`) here to allow
|
||||
users to manually enable/disable a plugin.
|
||||
|
||||
Returns:
|
||||
True if this plugin is active, False otherwise.
|
||||
"""
|
||||
...
|
||||
def localizedName(self) -> str:
|
||||
"""
|
||||
Retrieve the localized name of the plugin.
|
||||
@@ -2234,7 +2284,7 @@ class IPlugin(abc.ABC):
|
||||
The localized name of the plugin.
|
||||
"""
|
||||
...
|
||||
def master(self) -> "IPlugin":
|
||||
def master(self) -> str:
|
||||
"""
|
||||
Retrieve the master plugin of this plugin.
|
||||
|
||||
@@ -2265,6 +2315,17 @@ class IPlugin(abc.ABC):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def requirements(self) -> List["IPluginRequirement"]:
|
||||
"""
|
||||
Retrieve the requirements for this plugin.
|
||||
|
||||
This method is called right after `init()` and the ownership the requirements is
|
||||
|
||||
Returns:
|
||||
The list of requirements for this plugin.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def settings(self) -> List["PluginSetting"]:
|
||||
"""
|
||||
Returns:
|
||||
@@ -2577,6 +2638,18 @@ class IPluginGame(IPlugin):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def listSaves(self, folder: PyQt5.QtCore.QDir) -> List["ISaveGame"]:
|
||||
"""
|
||||
List saves in the given directory.
|
||||
|
||||
Args:
|
||||
folder: The folder to list saves from.
|
||||
|
||||
Returns:
|
||||
The list of game saves in the given folder.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def loadOrderMechanism(self) -> "LoadOrderMechanism":
|
||||
"""
|
||||
Returns:
|
||||
@@ -2638,20 +2711,6 @@ class IPluginGame(IPlugin):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def savegameExtension(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The file extension of save games for this game.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def savegameSEExtension(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The file extension of Script Extender saves for this game.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def savesDirectory(self) -> PyQt5.QtCore.QDir:
|
||||
"""
|
||||
Returns:
|
||||
@@ -3009,7 +3068,7 @@ class IPluginList:
|
||||
True if the handler was installed properly (there are currently no reasons for this to fail).
|
||||
"""
|
||||
...
|
||||
def onRefreshed(self, callback: Callable[[None], None]) -> bool:
|
||||
def onRefreshed(self, callback: Callable[[], None]) -> bool:
|
||||
"""
|
||||
Install a new handler to be called when the list of plugins is refreshed.
|
||||
|
||||
@@ -3200,6 +3259,48 @@ class IPluginPreview(IPlugin):
|
||||
"""
|
||||
...
|
||||
|
||||
class IPluginRequirement:
|
||||
"""
|
||||
Class representing requirements for plugins.
|
||||
"""
|
||||
|
||||
class Problem:
|
||||
"""
|
||||
Class representing a problem found by a requirement.
|
||||
"""
|
||||
|
||||
def __init__(self, short_description: str, long_description: str = ""):
|
||||
"""
|
||||
Args:
|
||||
short_description: Short description of the problem.
|
||||
long_description: Long description of the problem.
|
||||
"""
|
||||
...
|
||||
def longDescription(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
A long description of the problem.
|
||||
"""
|
||||
...
|
||||
def shortDescription(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
A short description of the problem.
|
||||
"""
|
||||
...
|
||||
def __init__(self): ...
|
||||
def check(self, organizer: "IOrganizer") -> Optional["IPluginRequirement.Problem"]:
|
||||
"""
|
||||
Check if the requirement is met, and return a problem if not.
|
||||
|
||||
Args:
|
||||
organizer: The IOrganizer instance.
|
||||
|
||||
Returns:
|
||||
The problem found if the requirement is not met, otherwise None.
|
||||
"""
|
||||
...
|
||||
|
||||
class IPluginTool(IPlugin):
|
||||
"""
|
||||
This is the simplest of plugin interfaces. Such plugins simply place an icon inside the tools submenu
|
||||
@@ -3332,10 +3433,16 @@ class ISaveGame:
|
||||
The creation time of the save.
|
||||
"""
|
||||
...
|
||||
def getFilename(self) -> str:
|
||||
def getFilepath(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The name of the (main) save file.
|
||||
The path name to the (main) file or folder for the save.
|
||||
"""
|
||||
...
|
||||
def getName(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
The name of this save, for display purpose.
|
||||
"""
|
||||
...
|
||||
def getSaveGroupIdentifier(self) -> str:
|
||||
@@ -3349,12 +3456,6 @@ class ISaveGame:
|
||||
The group identifier for this save game.
|
||||
"""
|
||||
...
|
||||
def hasScriptExtenderFile(self) -> bool:
|
||||
"""
|
||||
Returns:
|
||||
True if this save game has an associated script extender save, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
class ISaveGameInfoWidget(PyQt5.QtWidgets.QWidget):
|
||||
"""
|
||||
@@ -3374,12 +3475,12 @@ class ISaveGameInfoWidget(PyQt5.QtWidgets.QWidget):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def setSave(self, save: str):
|
||||
def setSave(self, save: "ISaveGame"):
|
||||
"""
|
||||
Set the save file to display in this widget.
|
||||
|
||||
Args:
|
||||
save: Path to the save file.
|
||||
save: The save to display in the widget
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -3657,6 +3758,101 @@ class ModRepositoryFileInfo:
|
||||
@staticmethod
|
||||
def createFromJson(data: str) -> "ModRepositoryFileInfo": ...
|
||||
|
||||
class PluginRequirementFactory:
|
||||
def __init__(self): ...
|
||||
@staticmethod
|
||||
def basic(
|
||||
checker: Callable[["IOrganizer"], bool], description: str
|
||||
) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a basic requirement.
|
||||
|
||||
Args:
|
||||
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.
|
||||
"""
|
||||
...
|
||||
@staticmethod
|
||||
def diagnose(diagnose: "IPluginDiagnose") -> "IPluginRequirement":
|
||||
"""
|
||||
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).
|
||||
|
||||
Args:
|
||||
diagnose: The diagnose plugin to wrap in this requirement.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def gameDependency(games: List[str]) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new game dependency requirement.
|
||||
|
||||
The requirement is met when the managed game is one of the specified game.
|
||||
|
||||
Args:
|
||||
games: The names of the required games.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def gameDependency(game: str) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new game dependency requirement.
|
||||
|
||||
The requirement is met when the managed game is the specified game.
|
||||
|
||||
Args:
|
||||
game: The name of the required game.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def pluginDependency(plugins: List[str]) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new plugin dependency requirement.
|
||||
|
||||
The requirement is met when one of the specified plugins is enabled.
|
||||
|
||||
Args:
|
||||
plugins: The name of the plugins.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
@overload
|
||||
@staticmethod
|
||||
def pluginDependency(plugin: str) -> "IPluginRequirement":
|
||||
"""
|
||||
Create a new plugin dependency requirement.
|
||||
|
||||
The requirement is met when the specified plugin is enabled.
|
||||
|
||||
Args:
|
||||
plugin: The name of the plugin that must be enabled.
|
||||
|
||||
Returns:
|
||||
The constructed requirement.
|
||||
"""
|
||||
...
|
||||
|
||||
class PluginSetting:
|
||||
"""
|
||||
Class to hold the user-configurable parameters a plugin accepts. The purpose of this class is
|
||||
@@ -3691,30 +3887,18 @@ class SaveGameInfo(abc.ABC):
|
||||
|
||||
def __init__(self): ...
|
||||
@abc.abstractmethod
|
||||
def getMissingAssets(self, filepath: str) -> Dict[str, List[str]]:
|
||||
def getMissingAssets(self, filepath: "ISaveGame") -> Dict[str, List[str]]:
|
||||
"""
|
||||
Retrieve missing assets from the save.
|
||||
|
||||
Args:
|
||||
filepath: Path to the save file.
|
||||
filepath: The save to find missing assets for.
|
||||
|
||||
Returns:
|
||||
A collection of missing assets and the modules that can supply those assets.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def getSaveGameInfo(self, filepath: str) -> "ISaveGame":
|
||||
"""
|
||||
Retrieve the information about the supplied save game.
|
||||
|
||||
Args:
|
||||
filepath: Path to the save file.
|
||||
|
||||
Returns:
|
||||
A SaveGame corresponding to the given save file.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def getSaveGameWidget(
|
||||
self, parent: PyQt5.QtWidgets.QWidget
|
||||
) -> Optional["ISaveGameInfoWidget"]:
|
||||
@@ -3730,18 +3914,6 @@ class SaveGameInfo(abc.ABC):
|
||||
A SaveGameInfoWidget to display information about save game.
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def hasScriptExtenderSave(self, filepath: str) -> bool:
|
||||
"""
|
||||
Check whether or not the save has a paired script extender save.
|
||||
|
||||
Args:
|
||||
filepath: Path to the save file.
|
||||
|
||||
Returns:
|
||||
True if the given save file has a paired script extender save, False otherwise.
|
||||
"""
|
||||
...
|
||||
|
||||
class ScriptExtender(abc.ABC):
|
||||
def __init__(self): ...
|
||||
@@ -3795,10 +3967,12 @@ class ScriptExtender(abc.ABC):
|
||||
"""
|
||||
...
|
||||
@abc.abstractmethod
|
||||
def saveGameAttachmentExtensions(self) -> List[str]:
|
||||
def savegameExtension(self) -> str:
|
||||
"""
|
||||
Retrieve the extension of script extender save files.
|
||||
|
||||
Returns:
|
||||
Additional savegame attachments.
|
||||
The extension of script extender save files (e.g. "skse").
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user