fix typos in codebase

This commit is contained in:
Jakub Trllo 2024-03-27 11:46:07 +01:00
parent 942ddddd09
commit 908e17430c
43 changed files with 62 additions and 61 deletions

View file

@ -1075,7 +1075,7 @@ class AddonsManager:
"""Print out report of time spent on addons initialization parts.
Reporting is not automated must be implemented for each initialization
part separatelly. Reports must be stored to `_report` attribute.
part separately. Reports must be stored to `_report` attribute.
Print is skipped if `_report` is empty.
Attribute `_report` is dictionary where key is "label" describing
@ -1267,7 +1267,7 @@ class TrayAddonsManager(AddonsManager):
def add_doubleclick_callback(self, addon, callback):
"""Register doubleclick callbacks on tray icon.
Currently there is no way how to determine which is launched. Name of
Currently, there is no way how to determine which is launched. Name of
callback can be defined with `doubleclick_callback` attribute.
Missing feature how to define default callback.

View file

@ -191,7 +191,7 @@ def _process_app_events() -> Optional[float]:
class LaunchQtApp(bpy.types.Operator):
"""A Base class for opertors to launch a Qt app."""
"""A Base class for operators to launch a Qt app."""
_app: QtWidgets.QApplication
_window = Union[QtWidgets.QDialog, ModuleType]

View file

@ -227,7 +227,7 @@ class BlendLoader(plugin.AssetLoader):
obj.animation_data_create()
obj.animation_data.action = actions[obj.name]
# Restore the old data, but reset memebers, as they don't exist anymore
# Restore the old data, but reset members, as they don't exist anymore
# This avoids a crash, because the memory addresses of those members
# are not valid anymore
old_data["members"] = []

View file

@ -32,7 +32,7 @@ class ValidateDeadlinePublish(pyblish.api.InstancePlugin,
tree = bpy.context.scene.node_tree
output_type = "CompositorNodeOutputFile"
output_node = None
# Remove all output nodes that inlcude "AYON" in the name.
# Remove all output nodes that include "AYON" in the name.
# There should be only one.
for node in tree.nodes:
if node.bl_idname == output_type and "AYON" in node.name:

View file

@ -118,7 +118,7 @@ class CelactionPrelaunchHook(PreLaunchHook):
def workfile_path(self):
workfile_path = self.data["last_workfile_path"]
# copy workfile from template if doesnt exist any on path
# copy workfile from template if doesn't exist any on path
if not os.path.exists(workfile_path):
# TODO add ability to set different template workfile path via
# settings

View file

@ -38,7 +38,7 @@ class CollectRenderPath(pyblish.api.InstancePlugin):
render_path = r_template_item["path"].format_strict(anatomy_data)
self.log.debug("__ render_path: `{}`".format(render_path))
# create dir if it doesnt exists
# create dir if it doesn't exists
try:
if not os.path.isdir(render_dir):
os.makedirs(render_dir, exist_ok=True)

View file

@ -615,7 +615,7 @@ def get_reformated_filename(filename, padded=True):
filename (str): file name
Returns:
type: string with reformated path
type: string with reformatted path
Example:
get_reformated_filename("plate.1001.exr") > plate.%04d.exr
@ -980,7 +980,7 @@ class MediaInfoFile(object):
@property
def file_pattern(self):
"""Clips file patter
"""Clips file pattern.
Returns:
str: file pattern. ex. file.[1-2].exr

View file

@ -1018,7 +1018,7 @@ class OpenClipSolver(flib.MediaInfoFile):
self.feed_version_name))
else:
self.log.debug("adding new track element ..")
# create new track as it doesnt exists yet
# create new track as it doesn't exist yet
# set current version to feeds on tmp
tmp_xml_feeds = tmp_xml_track.find('feeds')
tmp_xml_feeds.set('currentVersion', self.feed_version_name)

View file

@ -29,7 +29,7 @@ def get_reformated_filename(filename, padded=True):
filename (str): file name
Returns:
type: string with reformated path
type: string with reformatted path
Example:
get_reformated_filename("plate.1001.exr") > plate.%04d.exr

View file

@ -17,7 +17,7 @@ class CreateShotClip(opfapi.Creator):
presets = deepcopy(self.presets)
gui_inputs = self.get_gui_inputs()
# get key pares from presets and match it on ui inputs
# get key pairs from presets and match it on ui inputs
for k, v in gui_inputs.items():
if v["type"] in ("dict", "section"):
# nested dictionary (only one level allowed
@ -236,7 +236,7 @@ class CreateShotClip(opfapi.Creator):
"type": "QCheckBox",
"label": "Source resolution",
"target": "tag",
"toolTip": "Is resloution taken from timeline or source?", # noqa
"toolTip": "Is resolution taken from timeline or source?", # noqa
"order": 4},
}
},

View file

@ -37,7 +37,7 @@ class CollectTimelineInstances(pyblish.api.ContextPlugin):
self.otio_timeline = context.data["otioTimeline"]
self.fps = context.data["fps"]
# process all sellected
# process all selected
for segment in selected_segments:
# get openpype tag data
marker_data = opfapi.get_segment_data_marker(segment)

View file

@ -396,7 +396,7 @@ class FtrackEntityOperator:
entity = session.query(query).first()
# if entity doesnt exist then create one
# if entity doesn't exist then create one
if not entity:
entity = self.create_ftrack_entity(
session,

View file

@ -568,7 +568,7 @@ def save_scene():
"""Save the Harmony scene safely.
The built-in (to Avalon) background zip and moving of the Harmony scene
folder, interfers with server/client communication by sending two requests
folder, interferes with server/client communication by sending two requests
at the same time. This only happens when sending "scene.saveAll()". This
method prevents this double request and safely saves the scene.

View file

@ -166,7 +166,7 @@ def get_current_track(sequence, name, audio=False):
Creates new if none is found.
Args:
sequence (hiero.core.Sequence): hiero sequene object
sequence (hiero.core.Sequence): hiero sequence object
name (str): name of track we want to return
audio (bool)[optional]: switch to AudioTrack
@ -846,8 +846,8 @@ def create_nuke_workfile_clips(nuke_workfiles, seq=None):
[{
'path': 'P:/Jakub_testy_pipeline/test_v01.nk',
'name': 'test',
'handleStart': 15, # added asymetrically to handles
'handleEnd': 10, # added asymetrically to handles
'handleStart': 15, # added asymmetrically to handles
'handleEnd': 10, # added asymmetrically to handles
"clipIn": 16,
"frameStart": 991,
"frameEnd": 1023,
@ -1192,7 +1192,7 @@ def get_sequence_pattern_and_padding(file):
Return:
string: any matching sequence pattern
int: padding of sequnce numbering
int: padding of sequence numbering
"""
foundall = re.findall(
r"(#+)|(%\d+d)|(?<=[^a-zA-Z0-9])(\d+)(?=\.\w+$)", file)

View file

@ -90,7 +90,7 @@ def apply_transition(otio_track, otio_item, track):
if isinstance(track, hiero.core.AudioTrack):
kind = 'Audio'
# Gather TrackItems involved in trasition
# Gather TrackItems involved in transition
item_in, item_out = get_neighboring_trackitems(
otio_item,
otio_track,

View file

@ -25,7 +25,7 @@ def get_reformated_path(path, padded=True):
path (str): path url or simple file name
Returns:
type: string with reformated path
type: string with reformatted path
Example:
get_reformated_path("plate.[0001-1008].exr") > plate.%04d.exr

View file

@ -90,7 +90,7 @@ def apply_transition(otio_track, otio_item, track):
kind = "Audio"
try:
# Gather TrackItems involved in trasition
# Gather TrackItems involved in transition
item_in, item_out = get_neighboring_trackitems(
otio_item,
otio_track,

View file

@ -166,7 +166,7 @@ class CreateShotClip(phiero.Creator):
"type": "QCheckBox",
"label": "Source resolution",
"target": "tag",
"toolTip": "Is resloution taken from timeline or source?", # noqa
"toolTip": "Is resolution taken from timeline or source?", # noqa
"order": 4},
}
},
@ -211,7 +211,7 @@ class CreateShotClip(phiero.Creator):
presets = deepcopy(self.presets)
gui_inputs = deepcopy(self.gui_inputs)
# get key pares from presets and match it on ui inputs
# get key pairs from presets and match it on ui inputs
for k, v in gui_inputs.items():
if v["type"] in ("dict", "section"):
# nested dictionary (only one level allowed

View file

@ -43,7 +43,7 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
tracks_effect_items = self.collect_sub_track_items(all_tracks)
context.data["tracksEffectItems"] = tracks_effect_items
# process all sellected timeline track items
# process all selected timeline track items
for track_item in selected_timeline_items:
data = {}
clip_name = track_item.name()
@ -62,7 +62,7 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
}:
continue
# get clips subtracks and anotations
# get clips subtracks and annotations
annotations = self.clip_annotations(source_clip)
subtracks = self.clip_subtrack(track_item)
self.log.debug("Annotations: {}".format(annotations))
@ -439,10 +439,10 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
for item in subTrackItems:
if "TimeWarp" in item.name():
continue
# avoid all anotation
# avoid all annotation
if isinstance(item, hiero.core.Annotation):
continue
# # avoid all not anaibled
# avoid all disabled
if not item.isEnabled():
continue
subtracks.append(item)

View file

@ -59,7 +59,7 @@ class ARenderProduct(object):
def get_default_display_view_colorspace():
"""Returns the colorspace attribute of the default (display, view) pair.
It's used for 'ociocolorspace' parm in OpenGL Node."""
It's used for 'ociocolorspace' param in OpenGL Node."""
prefs = get_color_management_preferences()
return get_display_view_colorspace_name(

View file

@ -131,7 +131,7 @@ def get_main_window():
def suspended_refresh(suspend=True):
"""Suspend viewport refreshes
cmds.ogs(pause=True) is a toggle so we cant pass False.
cmds.ogs(pause=True) is a toggle so we can't pass False.
"""
if IS_HEADLESS:
yield
@ -583,7 +583,7 @@ def pairwise(iterable):
def collect_animation_defs(fps=False):
"""Get the basic animation attribute defintions for the publisher.
"""Get the basic animation attribute definitions for the publisher.
Returns:
OrderedDict
@ -3834,7 +3834,7 @@ def get_color_management_output_transform():
def image_info(file_path):
# type: (str) -> dict
"""Based on tha texture path, get its bit depth and format information.
"""Based on the texture path, get its bit depth and format information.
Take reference from makeTx.py in Arnold:
ImageInfo(filename): Get Image Information for colorspace
AiTextureGetFormat(filename): Get Texture Format

View file

@ -314,7 +314,7 @@ class CollectMayaRender(pyblish.api.InstancePlugin):
if not extend_frames:
instance.data["overrideExistingFrame"] = False
# Update the instace
# Update the instance
instance.data.update(data)
@staticmethod

View file

@ -34,7 +34,7 @@ class ValidateXgen(pyblish.api.InstancePlugin):
" Node type found: {}".format(node_type)
)
# Cant have inactive modifiers in collection cause Xgen will try and
# Can't have inactive modifiers in collection cause Xgen will try and
# look for them when loading.
palette = instance.data["xgmPalette"].replace("|", "")
inactive_modifiers = {}

View file

@ -814,7 +814,7 @@ def on_script_load():
def check_inventory_versions():
"""
Actual version idetifier of Loaded containers
Actual version identifier of Loaded containers
Any time this function is run it will check all nodes and filter only
Loader nodes for its version. It will get all versions from database
@ -2381,7 +2381,7 @@ def launch_workfiles_app():
Context.workfiles_launched = True
# get all imortant settings
# get all important settings
open_at_start = env_value_to_bool(
env_key="AYON_WORKFILE_TOOL_ON_START",
default=None)

View file

@ -910,7 +910,7 @@ class ExporterReviewMov(ExporterReview):
self._connect_to_above_nodes(
node, product_name, "Reposition node... `{}`"
)
# append reformated tag
# append reformatted tag
add_tags.append("reformated")
# only create colorspace baking if toggled on
@ -1114,7 +1114,7 @@ def convert_to_valid_instaces():
transfer_data["active"] = (
node["publish"].value())
# add idetifier
# add identifier
transfer_data["creator_identifier"] = product_type_to_identifier(
product_type
)

View file

@ -19,7 +19,7 @@ class ImageFromSequenceLoader(photoshop.PhotoshopLoader):
This loader will be triggered multiple times, but selected name will
match only to proper path.
Loader doesnt do containerization as there is currently no data model
Loader doesn't do containerization as there is currently no data model
of 'frame of rendered files' (only rendered sequence), update would be
difficult.
"""

View file

@ -925,7 +925,7 @@ def get_reformated_path(path, padded=False, first=False):
path (str): path url or simple file name
Returns:
type: string with reformated path
type: string with reformatted path
Example:
get_reformated_path("plate.[0001-1008].exr") > plate.%04d.exr

View file

@ -25,7 +25,7 @@ def get_reformated_path(path, padded=True, first=False):
path (str): path url or simple file name
Returns:
type: string with reformated path
type: string with reformatted path
Example:
get_reformated_path("plate.[0001-1008].exr") > plate.%04d.exr

View file

@ -166,7 +166,7 @@ class CreateShotClip(plugin.Creator):
"type": "QCheckBox",
"label": "Source resolution",
"target": "tag",
"toolTip": "Is resloution taken from timeline or source?", # noqa
"toolTip": "Is resolution taken from timeline or source?", # noqa
"order": 4},
}
},
@ -207,7 +207,7 @@ class CreateShotClip(plugin.Creator):
presets = None
def process(self):
# get key pares from presets and match it on ui inputs
# get key pairs from presets and match it on ui inputs
for k, v in self.gui_inputs.items():
if v["type"] in ("dict", "section"):
# nested dictionary (only one level allowed

View file

@ -20,7 +20,7 @@ class ValidateFrameRange(OptionalPyblishPluginMixin,
optional = True
# published data might be sequence (.mov, .mp4) in that counting files
# doesnt make sense
# doesn't make sense
check_extensions = ["exr", "dpx", "jpg", "jpeg", "png", "tiff", "tga",
"gif", "svg"]
skip_timelines_check = [] # skip for specific task names (regex)

View file

@ -125,7 +125,7 @@ class WindowCache:
@classmethod
def _before_show(cls):
"""Create QApplication if does not exists yet."""
"""Create QApplication if does not exist yet."""
if not cls._first_show:
return

View file

@ -524,7 +524,7 @@ def get_ayon_appdirs(*args):
def get_local_site_id():
"""Get local site identifier.
Identifier is created if does not exists yet.
Identifier is created if does not exist yet.
"""
# used for background syncing
site_id = os.environ.get("AYON_SITE_ID")

View file

@ -102,7 +102,7 @@ class StringTemplate(object):
""" Figure out with whole formatting.
Separate advanced keys (*Like '{project[name]}') from string which must
be formatted separatelly in case of missing or incomplete keys in data.
be formatted separately in case of missing or incomplete keys in data.
Args:
data (dict): Containing keys to be filled into template.

View file

@ -198,7 +198,7 @@ class CreatePublishRoyalRenderJob(pyblish.api.InstancePlugin,
priority = self.priority or instance.data.get("priority", 50)
# rr requires absolut path or all jobs won't show up in rControl
# rr requires absolute path or all jobs won't show up in rrControl
abs_metadata_path = self.anatomy.fill_root(rootless_metadata_path)
# command line set in E01__OpenPype__PublishJob.cfg, here only

View file

@ -529,7 +529,7 @@ class AttributeValues(object):
Has dictionary like methods. Not all of them are allowed all the time.
Args:
attr_defs(AbstractAttrDef): Defintions of value type and properties.
attr_defs(AbstractAttrDef): Definitions of value type and properties.
values(dict): Values after possible conversion.
origin_data(dict): Values loaded from host before conversion.
"""

View file

@ -347,7 +347,7 @@ class BaseCreator:
Returns:
str: Group label that can be used for grouping of instances in UI.
Group label can be overriden by instance itself.
Group label can be overridden by instance itself.
"""
if self._cached_group_label is None:
@ -607,18 +607,19 @@ class Creator(BaseCreator):
"""
# GUI Purposes
# - default_variants may not be used if `get_default_variants` is overriden
# - default_variants may not be used if `get_default_variants`
# is overridden
default_variants = []
# Default variant used in 'get_default_variant'
_default_variant = None
# Short description of product type
# - may not be used if `get_description` is overriden
# - may not be used if `get_description` is overridden
description = None
# Detailed description of product type for artists
# - may not be used if `get_detail_description` is overriden
# - may not be used if `get_detail_description` is overridden
detailed_description = None
# It does make sense to change context on creation

View file

@ -64,7 +64,7 @@ def convert_to_padded_path(path, padding):
padding (int): number of padding
Returns:
type: string with reformated path
type: string with reformatted path
Example:
convert_to_padded_path("plate.%d.exr") > plate.%04d.exr

View file

@ -116,7 +116,7 @@ class LoaderPlugin(list):
def is_compatible_loader(cls, context):
"""Return whether a loader is compatible with a context.
On override make sure it is overriden as class or static method.
On override make sure it is overridden as class or static method.
This checks the product type and the representation for the given
loader plugin.

View file

@ -1865,7 +1865,7 @@ class PlaceholderCreateMixin(object):
self.log.debug("Clean up of placeholder is not implemented.")
def _before_instance_create(self, placeholder):
"""Can be overriden. Is called before instance is created."""
"""Can be overridden. Is called before instance is created."""
pass

View file

@ -80,7 +80,7 @@ class ExtractOtioAudioTracks(pyblish.api.ContextPlugin):
# create duration
duration = (timeline_out_h - timeline_in_h) + 1
# ffmpeg generate new file only if doesnt exists already
# ffmpeg generate new file only if doesn't exists already
if not recycling_file:
# convert to seconds
start_sec = float(timeline_in_h / fps)

View file

@ -112,7 +112,7 @@ class ThumbnailsCache:
"""
thumbnails_dir = self.get_thumbnails_dir()
# Skip if thumbnails dir does not exists yet
# Skip if thumbnails dir does not exist yet
if not os.path.exists(thumbnails_dir):
return

View file

@ -39,7 +39,7 @@ def defer(delay, func):
This aids in keeping the GUI responsive, but complicates logic
when producing tests. To combat this, the environment variable ensures
that every operation is synchonous.
that every operation is synchronous.
Arguments:
delay (float): Delay multiplier; default 1, 0 means no delay

View file

@ -424,7 +424,7 @@ class ExtractReviewOutputDefModel(BaseSettingsModel):
title="Scale pixel aspect",
description=(
"Rescale input when it's pixel aspect ratio is not 1."
" Usefull for anamorph reviews."
" Useful for anamorphic reviews."
)
)
bg_color: ColorRGBA_uint8 = SettingsField(