Skip to content

Commit

Permalink
remove Literal typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Jun 27, 2024
1 parent 4cf5c52 commit 6cbb317
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions client/ayon_core/tools/publisher/models/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import traceback
import collections
from functools import partial
from typing import Optional, Dict, List, Union, Any, Iterable, Literal
from typing import Optional, Dict, List, Union, Any, Iterable

import arrow
import pyblish.plugin
Expand All @@ -22,15 +22,6 @@
# Define constant for plugin orders offset
PLUGIN_ORDER_OFFSET = 0.5

ActionFilterType = Literal[
"all",
"notProcessed",
"processed",
"failed",
"warning",
"failedOrWarning",
"succeeded"
]


class PublishReportMaker:
Expand Down Expand Up @@ -318,8 +309,10 @@ class PublishPluginActionItem:
action_id (str): Action id.
plugin_id (str): Plugin id.
active (bool): Action is active.
on_filter (ActionFilterType): Actions have 'on' attribute which define
when can be action triggered (e.g. 'all', 'failed', ...).
on_filter (Literal["all", "notProcessed", "processed", "failed",
"warning", "failedOrWarning", "succeeded"]): Actions have 'on'
attribute which define when can be action triggered
(e.g. 'all', 'failed', ...).
label (str): Action's label.
icon (Optional[str]) Action's icon.
"""
Expand All @@ -329,14 +322,14 @@ def __init__(
action_id: str,
plugin_id: str,
active: bool,
on_filter: ActionFilterType,
on_filter: str,
label: str,
icon: Optional[str],
):
self.action_id: str = action_id
self.plugin_id: str = plugin_id
self.active: bool = active
self.on_filter: ActionFilterType = on_filter
self.on_filter: str = on_filter
self.label: str = label
self.icon: Optional[str] = icon

Expand Down

0 comments on commit 6cbb317

Please sign in to comment.