Remove unintended code block and fix Hound lint warnings for <79 chars width

This commit is contained in:
Fabia Serra Arrizabalaga 2023-02-08 19:39:47 +01:00
parent b1ef1b751f
commit c13416b685
3 changed files with 21 additions and 37 deletions

View file

@ -24,7 +24,9 @@ class IntegrateShotgridPublish(pyblish.api.InstancePlugin):
for representation in instance.data.get("representations", []):
local_path = get_representation_path(instance, representation, False)
local_path = get_representation_path(
instance, representation, False
)
code = os.path.basename(local_path)
if representation.get("tags", []):

View file

@ -18,37 +18,15 @@ class IntegrateShotgridVersion(pyblish.api.InstancePlugin):
# TODO: Use path template solver to build version code from settings
anatomy = instance.data.get("anatomyData", {})
### Starts Alkemy-X Override ###
# code = "_".join(
# [
# anatomy["project"]["code"],
# anatomy["parent"],
# anatomy["asset"],
# anatomy["task"]["name"],
# "v{:03}".format(int(anatomy["version"])),
# ]
# )
# Initial editorial Shotgrid versions don't need task in name
if anatomy["app"] == "hiero":
code = "_".join(
[
anatomy["project"]["code"],
anatomy["parent"],
anatomy["asset"],
"v{:03}".format(int(anatomy["version"])),
]
)
else:
code = "_".join(
[
anatomy["project"]["code"],
anatomy["parent"],
anatomy["asset"],
anatomy["task"]["name"],
"v{:03}".format(int(anatomy["version"])),
]
)
### Ends Alkemy-X Override ###
code = "_".join(
[
anatomy["project"]["code"],
anatomy["parent"],
anatomy["asset"],
anatomy["task"]["name"],
"v{:03}".format(int(anatomy["version"])),
]
)
version = self._find_existing_version(code, context)
@ -64,9 +42,9 @@ class IntegrateShotgridVersion(pyblish.api.InstancePlugin):
data_to_update["sg_status_list"] = status
for representation in instance.data.get("representations", []):
# Get representation path from published_path or create it from stagingDir if not existent
local_path = get_representation_path(instance, representation, False)
self.log.info("Local path: %s", local_path)
local_path = get_representation_path(
instance, representation, False
)
if "shotgridreview" in representation.get("tags", []):