Skip to content

Commit bb3308e

Browse files
committed
Fix lint caused not detected due to old version of mypy
1 parent 8b99112 commit bb3308e

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

libs/labelbox/src/labelbox/schema/workflow/nodes/autoqa_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616
# Constants for this module
17-
DEFAULT_FILTER_LOGIC_AND = "and"
17+
DEFAULT_FILTER_LOGIC_AND: Literal["and"] = "and"
1818

1919

2020
class AutoQANode(BaseWorkflowNode):

libs/labelbox/src/labelbox/schema/workflow/nodes/custom_rework_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
logger = logging.getLogger(__name__)
1515

1616
# Module-level constants
17-
DEFAULT_FILTER_LOGIC_AND = "and"
17+
DEFAULT_FILTER_LOGIC_AND: Literal["and"] = "and"
1818

1919
# Type alias for config entries - use the same type as other nodes
2020
ConfigEntry = Dict[str, Any]

libs/labelbox/src/labelbox/schema/workflow/nodes/initial_labeling_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
logger = logging.getLogger(__name__)
1414

1515
# Module-level constants
16-
DEFAULT_FILTER_LOGIC_AND = "and"
16+
DEFAULT_FILTER_LOGIC_AND: Literal["and"] = "and"
1717

1818
# Type alias for config entries
1919
ConfigEntry = Dict[str, Union[str, int, None]]

libs/labelbox/src/labelbox/schema/workflow/nodes/initial_rework_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
logger = logging.getLogger(__name__)
1515

1616
# Module-level constants
17-
DEFAULT_FILTER_LOGIC_AND = "and"
17+
DEFAULT_FILTER_LOGIC_AND: Literal["and"] = "and"
1818

1919
# Type alias for config entries
2020
ConfigEntry = Dict[str, Union[str, int, None]]

libs/labelbox/src/labelbox/schema/workflow/nodes/review_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
logger = logging.getLogger(__name__)
1414

1515
# Module-level constants
16-
DEFAULT_FILTER_LOGIC_OR = "or"
16+
DEFAULT_FILTER_LOGIC_OR: Literal["or"] = "or"
1717

1818

1919
class ReviewNode(BaseWorkflowNode):

libs/labelbox/src/labelbox/schema/workflow/nodes/rework_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
logger = logging.getLogger(__name__)
1414

1515
# Module-level constants
16-
DEFAULT_FILTER_LOGIC_AND = "and"
16+
DEFAULT_FILTER_LOGIC_AND: Literal["and"] = "and"
1717

1818

1919
class ReworkNode(BaseWorkflowNode):

libs/labelbox/src/labelbox/schema/workflow/workflow_operations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ def create_node_internal(
198198
if hasattr(node, "custom_fields") and node.custom_fields:
199199
if "customFields" not in node_data:
200200
node_data["customFields"] = {}
201-
node_data["customFields"].update(node.custom_fields)
201+
# Ensure customFields is a dict before updating
202+
if isinstance(node_data["customFields"], dict):
203+
node_data["customFields"].update(node.custom_fields)
202204

203205
# Add config if present
204206
if hasattr(node, "node_config") and node.node_config:

0 commit comments

Comments
 (0)