2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-02 13:28:49 +00:00

rename to makr internal functions as internal so

This commit is contained in:
Matthias 2022-01-11 01:10:34 +01:00
parent 0b9a6a1123
commit 5424ee38e7
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -83,7 +83,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
self.def_path = inspect.getfile(self.__class__) self.def_path = inspect.getfile(self.__class__)
self.path = os.path.dirname(self.def_path) self.path = os.path.dirname(self.def_path)
self.set_package() self.define_package()
@property @property
def _is_package(self): def _is_package(self):
@ -217,23 +217,23 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
# endregion # endregion
# region package info # region package info
def get_package_commit(self): def _get_package_commit(self):
""" """
Get last git commit for the plugin Get last git commit for the plugin
""" """
return get_git_log(self.def_path) return get_git_log(self.def_path)
def get_package_metadata(self): def _get_package_metadata(self):
""" """
Get package metadata for plugin Get package metadata for plugin
""" """
return {} return {}
def set_package(self): def define_package(self):
""" """
Add package info of the plugin into plugins context Add package info of the plugin into plugins context
""" """
package = self.get_package_metadata() if self._is_package else self.get_package_commit() package = self._get_package_metadata() if self._is_package else self._get_package_commit()
# process date # process date
if package.get('date'): if package.get('date'):