mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
♻️ remove forgotten args, fix typos
This commit is contained in:
parent
ad64c3a66e
commit
1ad9728962
2 changed files with 16 additions and 21 deletions
|
|
@ -381,7 +381,7 @@ class OpenPypeVersion(semver.VersionInfo):
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_local_versions(
|
def get_local_versions(
|
||||||
cls, production: bool = None,
|
cls, production: bool = None,
|
||||||
staging: bool = None, compatible_with: OpenPypeVersion = None
|
staging: bool = None
|
||||||
) -> List:
|
) -> List:
|
||||||
"""Get all versions available on this machine.
|
"""Get all versions available on this machine.
|
||||||
|
|
||||||
|
|
@ -391,8 +391,10 @@ class OpenPypeVersion(semver.VersionInfo):
|
||||||
Args:
|
Args:
|
||||||
production (bool): Return production versions.
|
production (bool): Return production versions.
|
||||||
staging (bool): Return staging versions.
|
staging (bool): Return staging versions.
|
||||||
compatible_with (OpenPypeVersion): Return only those compatible
|
|
||||||
with specified version.
|
Returns:
|
||||||
|
list: of compatible versions available on the machine.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Return all local versions if arguments are set to None
|
# Return all local versions if arguments are set to None
|
||||||
if production is None and staging is None:
|
if production is None and staging is None:
|
||||||
|
|
@ -435,8 +437,7 @@ class OpenPypeVersion(semver.VersionInfo):
|
||||||
Args:
|
Args:
|
||||||
production (bool): Return production versions.
|
production (bool): Return production versions.
|
||||||
staging (bool): Return staging versions.
|
staging (bool): Return staging versions.
|
||||||
compatible_with (OpenPypeVersion): Return only those compatible
|
|
||||||
with specified version.
|
|
||||||
"""
|
"""
|
||||||
# Return all local versions if arguments are set to None
|
# Return all local versions if arguments are set to None
|
||||||
if production is None and staging is None:
|
if production is None and staging is None:
|
||||||
|
|
@ -745,9 +746,9 @@ class BootstrapRepos:
|
||||||
self, repo_dir: Path = None) -> Union[OpenPypeVersion, None]:
|
self, repo_dir: Path = None) -> Union[OpenPypeVersion, None]:
|
||||||
"""Copy zip created from OpenPype repositories to user data dir.
|
"""Copy zip created from OpenPype repositories to user data dir.
|
||||||
|
|
||||||
This detect OpenPype version either in local "live" OpenPype
|
This detects OpenPype version either in local "live" OpenPype
|
||||||
repository or in user provided path. Then it will zip it in temporary
|
repository or in user provided path. Then it will zip it in temporary
|
||||||
directory and finally it will move it to destination which is user
|
directory, and finally it will move it to destination which is user
|
||||||
data directory. Existing files will be replaced.
|
data directory. Existing files will be replaced.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -758,7 +759,7 @@ class BootstrapRepos:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# if repo dir is not set, we detect local "live" OpenPype repository
|
# if repo dir is not set, we detect local "live" OpenPype repository
|
||||||
# version and use it as a source. Otherwise repo_dir is user
|
# version and use it as a source. Otherwise, repo_dir is user
|
||||||
# entered location.
|
# entered location.
|
||||||
if repo_dir:
|
if repo_dir:
|
||||||
version = self.get_version(repo_dir)
|
version = self.get_version(repo_dir)
|
||||||
|
|
@ -1122,21 +1123,19 @@ class BootstrapRepos:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def find_openpype_version(
|
def find_openpype_version(
|
||||||
version: Union[str, OpenPypeVersion],
|
version: Union[str, OpenPypeVersion],
|
||||||
staging: bool,
|
staging: bool
|
||||||
compatible_with: OpenPypeVersion = None
|
|
||||||
) -> Union[OpenPypeVersion, None]:
|
) -> Union[OpenPypeVersion, None]:
|
||||||
"""Find location of specified OpenPype version.
|
"""Find location of specified OpenPype version.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
version (Union[str, OpenPypeVersion): Version to find.
|
version (Union[str, OpenPypeVersion): Version to find.
|
||||||
staging (bool): Filter staging versions.
|
staging (bool): Filter staging versions.
|
||||||
compatible_with (OpenPypeVersion, optional): Find only
|
|
||||||
versions compatible with specified one.
|
Returns:
|
||||||
|
requested OpenPypeVersion.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
installed_version = OpenPypeVersion.get_installed_version()
|
installed_version = OpenPypeVersion.get_installed_version()
|
||||||
if not compatible_with:
|
|
||||||
compatible_with = installed_version
|
|
||||||
if isinstance(version, str):
|
if isinstance(version, str):
|
||||||
version = OpenPypeVersion(version=version)
|
version = OpenPypeVersion(version=version)
|
||||||
|
|
||||||
|
|
@ -1144,8 +1143,7 @@ class BootstrapRepos:
|
||||||
return installed_version
|
return installed_version
|
||||||
|
|
||||||
local_versions = OpenPypeVersion.get_local_versions(
|
local_versions = OpenPypeVersion.get_local_versions(
|
||||||
staging=staging, production=not staging,
|
staging=staging, production=not staging
|
||||||
compatible_with=compatible_with
|
|
||||||
)
|
)
|
||||||
zip_version = None
|
zip_version = None
|
||||||
for local_version in local_versions:
|
for local_version in local_versions:
|
||||||
|
|
@ -1159,8 +1157,7 @@ class BootstrapRepos:
|
||||||
return zip_version
|
return zip_version
|
||||||
|
|
||||||
remote_versions = OpenPypeVersion.get_remote_versions(
|
remote_versions = OpenPypeVersion.get_remote_versions(
|
||||||
staging=staging, production=not staging,
|
staging=staging, production=not staging
|
||||||
compatible_with=compatible_with
|
|
||||||
)
|
)
|
||||||
for remote_version in remote_versions:
|
for remote_version in remote_versions:
|
||||||
if remote_version == version:
|
if remote_version == version:
|
||||||
|
|
@ -1237,8 +1234,6 @@ class BootstrapRepos:
|
||||||
otherwise.
|
otherwise.
|
||||||
include_zips (bool, optional): If set True it will try to find
|
include_zips (bool, optional): If set True it will try to find
|
||||||
OpenPype in zip files in given directory.
|
OpenPype in zip files in given directory.
|
||||||
compatible_with (OpenPypeVersion, optional): Find only those
|
|
||||||
versions compatible with the one specified.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
dict of Path: Dictionary of detected OpenPype version.
|
dict of Path: Dictionary of detected OpenPype version.
|
||||||
|
|
|
||||||
2
start.py
2
start.py
|
|
@ -689,7 +689,7 @@ def _find_frozen_openpype(use_version: str = None,
|
||||||
# Collect OpenPype versions
|
# Collect OpenPype versions
|
||||||
installed_version = OpenPypeVersion.get_installed_version()
|
installed_version = OpenPypeVersion.get_installed_version()
|
||||||
# Expected version that should be used by studio settings
|
# Expected version that should be used by studio settings
|
||||||
# - this option is used only if version is not explictly set and if
|
# - this option is used only if version is not explicitly set and if
|
||||||
# studio has set explicit version in settings
|
# studio has set explicit version in settings
|
||||||
studio_version = OpenPypeVersion.get_expected_studio_version(use_staging)
|
studio_version = OpenPypeVersion.get_expected_studio_version(use_staging)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue