Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Fix typos in comments and docstrings #276

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/ayon_core/addon/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ def print_report(self):
"""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
Expand Down Expand Up @@ -1267,7 +1267,7 @@ def __init__(self, settings=None):
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.
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/blender/api/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/blender/plugins/load/load_blend.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def exec_update(self, container: Dict, context: Dict):
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"] = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def process(self, instance):
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def execute(self):
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def process(self, instance):
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)
Expand Down
4 changes: 2 additions & 2 deletions client/ayon_core/hosts/flame/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -980,7 +980,7 @@ def drop_mode(self, text):

@property
def file_pattern(self):
"""Clips file patter
"""Clips file pattern.

Returns:
str: file pattern. ex. file.[1-2].exr
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/flame/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ def _update_open_clip(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/flame/otio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def process(self):
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
Expand Down Expand Up @@ -236,7 +236,7 @@ def get_gui_inputs(self):
"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},
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def process(self, context):
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def get_ftrack_entity(self, session, type, name, parent):

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,
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/harmony/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions client/ayon_core/hosts/hiero/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/hiero/api/otio/hiero_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/hiero/api/otio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
},
Expand Down Expand Up @@ -211,7 +211,7 @@ def process(self):
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def process(self, context):
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()
Expand All @@ -62,7 +62,7 @@ def process(self, context):
}:
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))
Expand Down Expand Up @@ -439,10 +439,10 @@ def clip_subtrack(clip):
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)
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/houdini/api/colorspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_colorspace_data(self):
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."""
iLLiCiTiT marked this conversation as resolved.
Show resolved Hide resolved

prefs = get_color_management_preferences()
return get_display_view_colorspace_name(
Expand Down
6 changes: 3 additions & 3 deletions client/ayon_core/hosts/maya/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def process(self, instance):
if not extend_frames:
instance.data["overrideExistingFrame"] = False

# Update the instace
# Update the instance
instance.data.update(data)

@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def process(self, instance):
" 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 = {}
Expand Down
4 changes: 2 additions & 2 deletions client/ayon_core/hosts/nuke/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions client/ayon_core/hosts/nuke/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ def generate_mov(self, farm=False, **kwargs):
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
Expand Down Expand Up @@ -1114,7 +1114,7 @@ def product_type_to_identifier(product_type):
transfer_data["active"] = (
node["publish"].value())

# add idetifier
# add identifier
transfer_data["creator_identifier"] = product_type_to_identifier(
product_type
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/resolve/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion client/ayon_core/hosts/resolve/otio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
},
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading
Loading