Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Release/3.16.9 quad 1.13.1 #6277

Closed

Conversation

BenSouchet
Copy link

No description provided.

ccaillot and others added 30 commits February 26, 2024 13:41
…eadline-attributes-for-publish-job

[Hotfix] Add Pools info into global instance
…enaming-when-layer-is-renamed

Bugfix: update renderlayer set and renderlayer attributes when layer is renamed
…nt-accs-dans-lexplorer-au-dernier-playblast-blender

#353: enhancement Ajout d'un bouton blender pour ouvrir window au der…
…e-publish-plugin

Add Include Handles Extractor Publish Plugin
return retrieved_format

return {
single_format['format'].lower(): single_format['converted_label'] for single_format in
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (98 > 79 characters)

@@ -106,6 +111,10 @@
name=subset_name,
resolutionWidth=render_item.width,
resolutionHeight=render_item.height,
format=[
self._convert_format_label(item.format, format_conversion_table)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (84 > 79 characters)

try:
format_conversion_table = project_settings["quad_custom_settings"]["hosts"]["aftereffects"]["publish"]["CollectAERender"]["format_conversion"]
except KeyError:
self.log.warning("Can't retrieve format conversion table from after effects custom plugins.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (105 > 79 characters)

@@ -53,6 +52,12 @@
version = context.data["version"]

project_entity = context.data["projectEntity"]
project_settings = get_project_settings(project_entity["name"])
try:
format_conversion_table = project_settings["quad_custom_settings"]["hosts"]["aftereffects"]["publish"]["CollectAERender"]["format_conversion"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (154 > 79 characters)

try:
project_settings_entity = ProjectSettings(project_name)
# Add a flag to be able to bypass the enabled protection for the anatomy attrs
project_settings_entity["project_anatomy"]._current_metadata["bypass_protect_anatomy_attributes"] = True
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (112 > 79 characters)


import six
from bson.objectid import ObjectId
from pymongo import DeleteOne, InsertOne, UpdateOne
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.operations_base.REMOVED_VALUE' imported but unused

new_update_data["thumbnailId"] = data.pop("thumbnail_id")

if "tasks" in data:
tasks = data.pop("tasks")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable 'tasks' is assigned to but never used


def _get_default_template_name(templates):
default_template = None
for name, template in templates.items():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loop control variable 'template' not used within the loop body. If this is intended, start the name with an underscore.




def get_linked_representation_id(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many blank lines (3)

if body is not None:
try:
json.dumps(body)
except:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use bare except:, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:. If you're sure what you're doing, be explicit and write except BaseException:.
do not use bare 'except'

json.dumps(new_update_data, default=entity_data_json_default)
)

except:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use bare except:, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:. If you're sure what you're doing, be explicit and write except BaseException:.
do not use bare 'except'

json.dumps(new_data, default=entity_data_json_default)
)

except:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use bare except:, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:. If you're sure what you're doing, be explicit and write except BaseException:.
do not use bare 'except'

partial_method = functools.partial(set_settings,
frames,
resolution,
use_custom_settings=use_custom_settings)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

from openpype.tools.adobe_webserver.app import WebServerTool

from .ws_stub import get_stub
from .lib import set_settings
from .lib import set_settings, retrieve_custom_settings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.lib.retrieve_custom_settings' imported but unused

override_width = workfile_overrides.get('working_resolution_width')
if override_width: settings["resolutionWidth"] = override_width
override_height = workfile_overrides.get('working_resolution_height')
if override_height: settings["resolutionHeight"] = override_height
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (colon)

project_settings = get_project_settings(project_name)
custom_settings = project_settings.get('quad_custom_settings')
if not custom_settings:
log.warning("Can't access to quad custom settings. Custom settings will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (97 > 79 characters)

# so 2 element have the "layer_name"
# To avoid passing from 1 to 3, we must divide the occurence
if occurrences !=0 and is_psd:
occurrences = int(occurrences/2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace around arithmetic operator

# when a psd is load, it creates a compostion AND a folder,
# so 2 element have the "layer_name"
# To avoid passing from 1 to 3, we must divide the occurence
if occurrences !=0 and is_psd:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace around operator

@@ -4,8 +4,9 @@
import contextlib
import logging

from openpype.pipeline.context_tools import get_current_context
from openpype.pipeline.context_tools import get_current_context, get_project_settings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (85 > 79 characters)

if not _app:
print("Starting new QApplication..")
_app = QtWidgets.QApplication([])
_app = get_openpype_qt_app()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable '_app' is assigned to but never used

json.dumps(new_update_data, default=entity_data_json_default)
)

except:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use bare except:, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:. If you're sure what you're doing, be explicit and write except BaseException:.
do not use bare 'except'

json.dumps(new_data, default=entity_data_json_default)
)

except:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use bare except:, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:. If you're sure what you're doing, be explicit and write except BaseException:.
do not use bare 'except'

partial_method = functools.partial(set_settings,
frames,
resolution,
use_custom_settings=use_custom_settings)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

from openpype.tools.adobe_webserver.app import WebServerTool

from .ws_stub import get_stub
from .lib import set_settings
from .lib import set_settings, retrieve_custom_settings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.lib.retrieve_custom_settings' imported but unused

override_width = workfile_overrides.get('working_resolution_width')
if override_width: settings["resolutionWidth"] = override_width
override_height = workfile_overrides.get('working_resolution_height')
if override_height: settings["resolutionHeight"] = override_height
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (colon)

project_settings = get_project_settings(project_name)
custom_settings = project_settings.get('quad_custom_settings')
if not custom_settings:
log.warning("Can't access to quad custom settings. Custom settings will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (97 > 79 characters)

# so 2 element have the "layer_name"
# To avoid passing from 1 to 3, we must divide the occurence
if occurrences !=0 and is_psd:
occurrences = int(occurrences/2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace around arithmetic operator

# when a psd is load, it creates a compostion AND a folder,
# so 2 element have the "layer_name"
# To avoid passing from 1 to 3, we must divide the occurence
if occurrences !=0 and is_psd:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace around operator

@@ -4,8 +4,9 @@
import contextlib
import logging

from openpype.pipeline.context_tools import get_current_context
from openpype.pipeline.context_tools import get_current_context, get_project_settings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (85 > 79 characters)

if not _app:
print("Starting new QApplication..")
_app = QtWidgets.QApplication([])
_app = get_openpype_qt_app()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable '_app' is assigned to but never used


comp = stub.import_file(self.fname, stub.LOADED_ICON + comp_name,
import_options)
comp = stub.import_file(path_str, stub.LOADED_ICON + comp_name, import_options)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

is_psd = path.suffix == '.psd'

comp_name = get_unique_layer_name(
existing_layers, "{}_{}".format(context["asset"]["name"], name), is_psd=is_psd)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

project_name = context['project']['name']
import_options['fps'] = Anatomy(project_name)['attributes']['fps']
except KeyError:
self.log.warning(f"Can't retrieve fps information for project {project_name}. Frame rate will not be set at import.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (133 > 79 characters)

self.log.warning(f"Can't retrieve fps information for asset {name}. Will try to load data from project.")
try:
project_name = context['project']['name']
import_options['fps'] = Anatomy(project_name)['attributes']['fps']
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

try:
import_options['fps'] = context['asset']['data']['fps']
except KeyError:
self.log.warning(f"Can't retrieve fps information for asset {name}. Will try to load data from project.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (117 > 79 characters)

@@ -600,7 +655,7 @@
return version['__version__']

def create_version_from_live_code(
self, repo_dir: Path = None) -> Union[OpenPypeVersion, None]:
self, repo_dir: Path = None, data_dir: Path = None) -> Union[OpenPypeVersion, None]:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (96 > 79 characters)

if not AYON_SERVER_ENABLED:
from .mongo.entities import *
else:
from .server.entities import *
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.server.entities.*' imported but unused
'from .server.entities import *' used; unable to detect undefined names

Update:
- project
"""
if not AYON_SERVER_ENABLED:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.mongo.entities.*' imported but unused
'from .mongo.entities import *' used; unable to detect undefined names

if not AYON_SERVER_ENABLED:
from .mongo.entity_links import *
else:
from .server.entity_links import *
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.server.entity_links.*' imported but unused
'from .server.entity_links import *' used; unable to detect undefined names

link_id = input_link.get("id") or input_link.get("_id")
if link_id is not None:
correctly_linked_ids.add(link_id)
if not AYON_SERVER_ENABLED:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.mongo.entity_links.*' imported but unused
'from .mongo.entity_links import *' used; unable to detect undefined names

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

overrides_group = self._get_override_group(resolution_overrides, host_name)

if not overrides_group:
log.warning("Can't find overrides group that fit application. Abort.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

return

host_name = get_current_host_name()
overrides_group = self._get_override_group(resolution_overrides, host_name)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

project_name = get_current_project_name()
resolution_overrides = custom_settings.get("general", {}).get("working_resolution_overrides", None)
if not resolution_overrides:
log.warning("Can't retrieve resolution overrides for workfiles. Will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (98 > 79 characters)


def set_workfile_overrides(self, custom_settings):
project_name = get_current_project_name()
resolution_overrides = custom_settings.get("general", {}).get("working_resolution_overrides", None)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (107 > 79 characters)

def set_custom_resolution(self):
custom_settings = self.get_custom_settings()
if not custom_settings:
log.warning("Can't access to quad custom settings. Custom settings will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (101 > 79 characters)

def set_read_only(self, status):
self._read_only = status
if self.is_disabled():
# Enforce read-only (security) since this widget should stay disabled
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

self._parent_widget_by_entity_id = {}
self._added_wrapper_ids = set()

super(DictImmutableKeysWidget, self).__init__(category_widget, entity, entity_widget)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (93 > 79 characters)

# Skip current project
continue

action_project = ProjectSettingsAction(project_name, submenu_projects)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

action.version_triggered.connect(
self.version_change_requested
if versions:
submenu_versions = QtWidgets.QMenu("Use settings from version", menu)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

title += " [View only]"
self.setWindowTitle(title)

def _on_tab_changed(self):
def is_protected(self, current_widget):
return (self._protect_system_settings and isinstance(current_widget, SystemWidget))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

overrides_group = self._get_override_group(resolution_overrides, host_name)

if not overrides_group:
log.warning("Can't find overrides group that fit application. Abort.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

return

host_name = get_current_host_name()
overrides_group = self._get_override_group(resolution_overrides, host_name)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

project_name = get_current_project_name()
resolution_overrides = custom_settings.get("general", {}).get("working_resolution_overrides", None)
if not resolution_overrides:
log.warning("Can't retrieve resolution overrides for workfiles. Will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (98 > 79 characters)


def set_workfile_overrides(self, custom_settings):
project_name = get_current_project_name()
resolution_overrides = custom_settings.get("general", {}).get("working_resolution_overrides", None)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (107 > 79 characters)

def set_custom_resolution(self):
custom_settings = self.get_custom_settings()
if not custom_settings:
log.warning("Can't access to quad custom settings. Custom settings will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (101 > 79 characters)

def set_read_only(self, status):
self._read_only = status
if self.is_disabled():
# Enforce read-only (security) since this widget should stay disabled
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

self._parent_widget_by_entity_id = {}
self._added_wrapper_ids = set()

super(DictImmutableKeysWidget, self).__init__(category_widget, entity, entity_widget)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (93 > 79 characters)

# Skip current project
continue

action_project = ProjectSettingsAction(project_name, submenu_projects)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

action.version_triggered.connect(
self.version_change_requested
if versions:
submenu_versions = QtWidgets.QMenu("Use settings from version", menu)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

title += " [View only]"
self.setWindowTitle(title)

def _on_tab_changed(self):
def is_protected(self, current_widget):
return (self._protect_system_settings and isinstance(current_widget, SystemWidget))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

overrides_group = self._get_override_group(resolution_overrides, host_name)

if not overrides_group:
log.warning("Can't find overrides group that fit application. Abort.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

return

host_name = get_current_host_name()
overrides_group = self._get_override_group(resolution_overrides, host_name)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (83 > 79 characters)

project_name = get_current_project_name()
resolution_overrides = custom_settings.get("general", {}).get("working_resolution_overrides", None)
if not resolution_overrides:
log.warning("Can't retrieve resolution overrides for workfiles. Will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (98 > 79 characters)


def set_workfile_overrides(self, custom_settings):
project_name = get_current_project_name()
resolution_overrides = custom_settings.get("general", {}).get("working_resolution_overrides", None)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (107 > 79 characters)

def set_custom_resolution(self):
custom_settings = self.get_custom_settings()
if not custom_settings:
log.warning("Can't access to quad custom settings. Custom settings will not be applied.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (101 > 79 characters)

def set_read_only(self, status):
self._read_only = status
if self.is_disabled():
# Enforce read-only (security) since this widget should stay disabled
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

self._parent_widget_by_entity_id = {}
self._added_wrapper_ids = set()

super(DictImmutableKeysWidget, self).__init__(category_widget, entity, entity_widget)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (93 > 79 characters)

# Skip current project
continue

action_project = ProjectSettingsAction(project_name, submenu_projects)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

action.version_triggered.connect(
self.version_change_requested
if versions:
submenu_versions = QtWidgets.QMenu("Use settings from version", menu)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

title += " [View only]"
self.setWindowTitle(title)

def _on_tab_changed(self):
def is_protected(self, current_widget):
return (self._protect_system_settings and isinstance(current_widget, SystemWidget))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@@ -274,13 +289,13 @@ def reset(self):
return

if not self._user_passed:
self._user_passed = not is_admin_password_required()
self._user_passed = not is_admin_password_required(admin_bypass_enabled=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (90 > 79 characters)

production_version = current_settings.get('general').get("production_version")
# If production_version is empty, this means no version can be found
# Avoid blocking the system settings in that case
if production_version and production_version != studio_widget._current_version:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (87 > 79 characters)

@@ -141,6 +148,14 @@
project_widget
]

current_settings = get_system_settings()
production_version = current_settings.get('general').get("production_version")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (86 > 79 characters)

@@ -370,7 +373,7 @@ def execute_doubleclick(self):

def _on_version_check_timer(self):
# Check if is running from build and stop future validations if yes
if not is_running_from_build() or not op_version_control_available():
if not is_version_checking_popup_enabled() or not is_running_from_build() or not op_version_control_available():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (120 > 79 characters)

def update_builder_action(self, family_widget, builder_widget):
"""Update builder action widget by family widget value"""
builder_widget._input_widget.clear()
actions_by_family = get_actions_by_family(family_widget.current_value())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (80 > 79 characters)

for s in sections:
s.params.set_editor_property('animation', animation)
for section in sections:
section.params.set_editor_property('animation', animation)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

bpy.types.WindowManager.scene_filepath = bpy.props.StringProperty('')
bpy.types.WindowManager.render_bool_properties = bpy.props.CollectionProperty(type=RenderBoolProperty)
bpy.types.WindowManager.render_list_properties = bpy.props.CollectionProperty(type=RenderListProperty)
bpy.types.WindowManager.render_layers_to_use = bpy.props.CollectionProperty(type=RenderLayerProperty)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (105 > 79 characters)


bpy.types.WindowManager.scene_filepath = bpy.props.StringProperty('')
bpy.types.WindowManager.render_bool_properties = bpy.props.CollectionProperty(type=RenderBoolProperty)
bpy.types.WindowManager.render_list_properties = bpy.props.CollectionProperty(type=RenderListProperty)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (106 > 79 characters)

bpy.utils.register_class(RenderLayerProperty)

bpy.types.WindowManager.scene_filepath = bpy.props.StringProperty('')
bpy.types.WindowManager.render_bool_properties = bpy.props.CollectionProperty(type=RenderBoolProperty)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (106 > 79 characters)


def execute(self, context):
bpy.ops.wm.open_mainfile(filepath=bpy.context.window_manager.scene_filepath)
logging.info(f"Previous scene has been loaded from {bpy.context.window_manager.scene_filepath}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (104 > 79 characters)

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@@ -1089,6 +1157,9 @@ def boot():
except KeyError:
pass

# Do the program display popups to the users regarding updates or incompatibilities
os.environ["OPENPYPE_VERSION_CHECK_POPUP"] = "False" if "disable_version_popup" in commands else "True"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (107 > 79 characters)

@@ -1089,6 +1157,9 @@
except KeyError:
pass

# Do the program display popups to the users regarding updates or incompatibilities
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (87 > 79 characters)

op_version_to_extract = bootstrap.create_version_from_live_code(data_dir=debug_dir)

if op_version_to_extract:
_install_and_initialize_version(op_version_to_extract, delete_zip=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (80 > 79 characters)


# Generate Zip
debug_dir = Path(openpype_path, "debug")
op_version_to_extract = bootstrap.create_version_from_live_code(data_dir=debug_dir)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

op_version_to_extract = None

_print(">>> OP Version Exists in User(local) Dir: {}".format(bool(user_dir_version)))
_print(">>> OP Version Exists in Prod(remote) Dir: {}".format(bool(prod_dir_version)))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (90 > 79 characters)

render_node_output_path = templates.get_render_node_output_path(render_layer_name=render_layer_name)

if convert_to_linux_paths:
render_node_output_path = _replace_path_parts_to_linux(render_node_output_path)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

for output_node in [node for node in bpy.context.scene.node_tree.nodes if node.type == NodesNames.OUTPUT_FILE.value]:
render_node = _browse_render_nodes(output_node.inputs)
render_layer_name = render_node.layer
render_node_output_path = templates.get_render_node_output_path(render_layer_name=render_layer_name)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (108 > 79 characters)



def set_render_nodes_output_path(convert_to_linux_paths=False):
for output_node in [node for node in bpy.context.scene.node_tree.nodes if node.type == NodesNames.OUTPUT_FILE.value]:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (121 > 79 characters)

log.info(f"Global output path has been set to '{bpy.context.scene.render.filepath}'")
if create_directory:
Path(bpy.context.scene.render.filepath).mkdir(parents=True, exist_ok=True)
log.info(f"Folder at path '{bpy.context.scene.render.filepath}' has been created.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

bpy.context.scene.render.filepath = templates.get_render_global_output_path()
log.info(f"Global output path has been set to '{bpy.context.scene.render.filepath}'")
if create_directory:
Path(bpy.context.scene.render.filepath).mkdir(parents=True, exist_ok=True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 381, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'


def set_global_output_path(create_directory=False):
bpy.context.scene.render.filepath = templates.get_render_global_output_path()
log.info(f"Global output path has been set to '{bpy.context.scene.render.filepath}'")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (89 > 79 characters)



def set_global_output_path(create_directory=False):
bpy.context.scene.render.filepath = templates.get_render_global_output_path()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)


setattr(modifier, modifier_attribute, _replace_path_parts_to_linux(path_to_replace))
new_path = getattr(modifier, modifier_attribute, None)
log.info(f"Cache file path has been updated from {path_to_replace} to {new_path}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (94 > 79 characters)

if not path_to_replace:
continue

setattr(modifier, modifier_attribute, _replace_path_parts_to_linux(path_to_replace))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (96 > 79 characters)

for cache_file in bpy.data.cache_files:
old_path = cache_file.filepath
cache_file.filepath = _replace_path_parts_to_linux(cache_file.filepath)
log.info(f"Cache file path has updated from {old_path} to {cache_file.filepath}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (89 > 79 characters)

col.prop(render_property, 'value', text=render_property.name)

col.separator()
for render_property in bpy.context.window_manager.render_list_properties:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

def draw(self, context):
layout = self.layout
col = layout.column(align=True)
for render_property in bpy.context.window_manager.render_bool_properties:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

class RenderListProperty(bpy.types.PropertyGroup):
name: bpy.props.StringProperty(name="Property name")
path: bpy.props.StringProperty(name="Path to access property")
items: bpy.props.EnumProperty(name="Selectable values", items=generate_enums_from_render_selectors)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (103 > 79 characters)


@bpy.app.handlers.persistent
def populate_render_properties(dummy=None):
def _set_common_infos(item, render_property):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

over-indented



def get_render_layers_names():
return [render_layer.name for render_layer in bpy.context.scene.view_layers]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (80 > 79 characters)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants