diff --git a/configs/config-2.4.yml b/configs/config-2.4.yml index 3562f2e..4835cc6 100644 --- a/configs/config-2.4.yml +++ b/configs/config-2.4.yml @@ -642,7 +642,7 @@ mobase: The path to copy the entry to. If the path ends with / or \\, the entry will be copied in the corresponding directory instead of replacing it. If the given path is empty (`""`), the entry is copied directly under this tree. - policy: Policy to use to resolve conflicts. + insert_policy: Policy to use to resolve conflicts. returns: The new entry (copy of the specified entry). raises: RuntimeError: If the entry could not be copied. @@ -2947,7 +2947,7 @@ mobase: getMissingAssets: __doc__: Retrieve missing assets from the save. args: - filepath: The save to find missing assets for. + save: The save to find missing assets for. returns: | A collection of missing assets and the modules that can supply those assets. @@ -3095,7 +3095,7 @@ mobase: args: value: String to parse. scheme: Scheme to use to parse the string. - manual_input: True if the given string should be treated as user input. + is_manual: True if the given string should be treated as user input. scheme: returns: The version scheme in effect for this VersionInfo. diff --git a/generator/utils.py b/generator/utils.py index f127f7f..b33488d 100644 --- a/generator/utils.py +++ b/generator/utils.py @@ -339,6 +339,20 @@ class Settings: for sarg, marg in zip(fsettings.args, margs): marg.doc = sarg.doc + if ( + not marg.name.startswith("arg") + and marg.name != sarg.name + ): + logger.warn( + "Mismatch argument name for method {}.{}: {} {}, using {}.".format( # noqa: E501 + cls.canonical_name, + sname, + marg.name, + sarg.name, + sarg.name, + ) + ) + marg.name = sarg.name if not sarg.type.is_none(): marg.type = sarg.type diff --git a/stubs/2.4.0/mobase.pyi b/stubs/2.4.0/mobase.pyi index af964e7..245a2be 100644 --- a/stubs/2.4.0/mobase.pyi +++ b/stubs/2.4.0/mobase.pyi @@ -795,7 +795,7 @@ class IFileTree(FileTreeEntry): self, entry: "FileTreeEntry", path: str = "", - policy: "IFileTree.InsertPolicy" = InsertPolicy.FAIL_IF_EXISTS, + insert_policy: "IFileTree.InsertPolicy" = InsertPolicy.FAIL_IF_EXISTS, ) -> "FileTreeEntry": """ Move the given entry to the given path under this tree. @@ -816,7 +816,7 @@ class IFileTree(FileTreeEntry): path: The path to copy the entry to. If the path ends with / or \\, the entry will be copied in the corresponding directory instead of replacing it. If the given path is empty (`""`), the entry is copied directly under this tree. - policy: Policy to use to resolve conflicts. + insert_policy: Policy to use to resolve conflicts. Returns: The new entry (copy of the specified entry). @@ -3900,12 +3900,12 @@ class SaveGameInfo(abc.ABC): def __init__(self): ... @abc.abstractmethod - def getMissingAssets(self, filepath: "ISaveGame") -> Dict[str, List[str]]: + def getMissingAssets(self, save: "ISaveGame") -> Dict[str, List[str]]: """ Retrieve missing assets from the save. Args: - filepath: The save to find missing assets for. + save: The save to find missing assets for. Returns: A collection of missing assets and the modules that can supply those assets. @@ -4155,7 +4155,7 @@ class VersionInfo: self, value: str, scheme: "VersionScheme" = VersionScheme.DISCOVER, - manual_input: bool = False, + is_manual: bool = False, ): """ Update this VersionInfo by parsing the given string using the given scheme. @@ -4163,7 +4163,7 @@ class VersionInfo: Args: value: String to parse. scheme: Scheme to use to parse the string. - manual_input: True if the given string should be treated as user input. + is_manual: True if the given string should be treated as user input. """ ... def scheme(self) -> "VersionScheme": diff --git a/stubs/setup/mobase-stubs/__init__.pyi b/stubs/setup/mobase-stubs/__init__.pyi index af964e7..245a2be 100644 --- a/stubs/setup/mobase-stubs/__init__.pyi +++ b/stubs/setup/mobase-stubs/__init__.pyi @@ -795,7 +795,7 @@ class IFileTree(FileTreeEntry): self, entry: "FileTreeEntry", path: str = "", - policy: "IFileTree.InsertPolicy" = InsertPolicy.FAIL_IF_EXISTS, + insert_policy: "IFileTree.InsertPolicy" = InsertPolicy.FAIL_IF_EXISTS, ) -> "FileTreeEntry": """ Move the given entry to the given path under this tree. @@ -816,7 +816,7 @@ class IFileTree(FileTreeEntry): path: The path to copy the entry to. If the path ends with / or \\, the entry will be copied in the corresponding directory instead of replacing it. If the given path is empty (`""`), the entry is copied directly under this tree. - policy: Policy to use to resolve conflicts. + insert_policy: Policy to use to resolve conflicts. Returns: The new entry (copy of the specified entry). @@ -3900,12 +3900,12 @@ class SaveGameInfo(abc.ABC): def __init__(self): ... @abc.abstractmethod - def getMissingAssets(self, filepath: "ISaveGame") -> Dict[str, List[str]]: + def getMissingAssets(self, save: "ISaveGame") -> Dict[str, List[str]]: """ Retrieve missing assets from the save. Args: - filepath: The save to find missing assets for. + save: The save to find missing assets for. Returns: A collection of missing assets and the modules that can supply those assets. @@ -4155,7 +4155,7 @@ class VersionInfo: self, value: str, scheme: "VersionScheme" = VersionScheme.DISCOVER, - manual_input: bool = False, + is_manual: bool = False, ): """ Update this VersionInfo by parsing the given string using the given scheme. @@ -4163,7 +4163,7 @@ class VersionInfo: Args: value: String to parse. scheme: Scheme to use to parse the string. - manual_input: True if the given string should be treated as user input. + is_manual: True if the given string should be treated as user input. """ ... def scheme(self) -> "VersionScheme":