generated from ynput/ayon-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move
simple_creators
and editorial_creators
to a better place and…
… implement conversion
- Loading branch information
1 parent
8a575cf
commit ec9647c
Showing
7 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from typing import Any | ||
|
||
|
||
def _convert_simple_creators_0_2_9(overrides): | ||
if "simple_creators" not in overrides: | ||
return | ||
|
||
if overrides.get("create") is None: | ||
overrides.update({ | ||
"create": {} | ||
}) | ||
|
||
overrides["create"]["simple_creators"] = overrides.pop("simple_creators") | ||
|
||
|
||
def _convert_editorial_creators_0_2_9(overrides): | ||
if "editorial_creators" not in overrides: | ||
return | ||
|
||
if overrides.get("create") is None: | ||
overrides.update({ | ||
"create": {} | ||
}) | ||
|
||
overrides["create"]["editorial_creators"] = overrides.pop("editorial_creators") | ||
|
||
|
||
def convert_settings_overrides( | ||
source_version: str, | ||
overrides: dict[str, Any], | ||
) -> dict[str, Any]: | ||
_convert_simple_creators_0_2_9(overrides) | ||
_convert_editorial_creators_0_2_9(overrides) | ||
return overrides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters