Skip to content

Commit

Permalink
Add union to config_model
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Brown committed Aug 22, 2023
1 parent 9cd25a3 commit 63ce046
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions buildrunner/config_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with the terms of the Adobe license agreement accompanying it.
"""

from typing import Dict, List, Optional, Set
from typing import Dict, List, Optional, Set, Union

from pydantic import BaseModel # pylint: disable=no-name-in-module

Expand All @@ -29,8 +29,7 @@ class StepPushDict(BaseModel):
class Step(BaseModel):
""" Step model """
build: Optional[StepBuild]
# pylint: disable=unsubscriptable-object,unsupported-binary-operation
push: Optional[StepPushDict | List[str | StepPushDict] | str]
push: Optional[Union[StepPushDict, List[Union[str, StepPushDict]], str]]

def is_multi_platform(self):
"""
Expand Down Expand Up @@ -65,8 +64,7 @@ def has_multi_platform_build(self):
return False

def validate_push(self,
# pylint: disable=unsubscriptable-object,unsupported-binary-operation
push: StepPushDict | list[str | StepPushDict] | str,
push: Union[StepPushDict, list[Union[str, StepPushDict]], str],
mp_push_tags: Set[str],
step_name: str,
update_mp_push_tags: bool = True):
Expand Down

0 comments on commit 63ce046

Please sign in to comment.