Skip to content

Commit 54098b5

Browse files
committed
Approval status fix
1 parent cc1a353 commit 54098b5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pytest.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
minversion = 3.7
33
log_cli=true
44
python_files = test_*.py
5-
pytest_plugins = ['pytest_profiling']
6-
addopts = -n auto --dist=loadscope
5+
;pytest_plugins = ['pytest_profiling']
6+
;addopts = -n auto --dist=loadscope
77

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"NotStarted", "InProgress", "QualityCheck", "Returned", "Completed", "Skipped"
8484
]
8585

86-
APPROVAL_STATUS = Literal["Approved", "Disapproved"]
86+
APPROVAL_STATUS = Literal["Approved", "Disapproved", None]
8787

8888
IMAGE_QUALITY = Literal["compressed", "original"]
8989

@@ -3101,7 +3101,7 @@ def add_items_to_subset(
31013101
def set_approval_statuses(
31023102
self,
31033103
project: NotEmptyStr,
3104-
approval_status: Union[APPROVAL_STATUS, None],
3104+
approval_status: Optional[APPROVAL_STATUS],
31053105
items: Optional[List[NotEmptyStr]] = None,
31063106
):
31073107
"""Sets annotation statuses of items

src/superannotate/lib/infrastructure/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def make_literal_validator(
2222
Adding ability to input literal in the lower case.
2323
"""
2424
permitted_choices = validators.all_literal_values(type_)
25-
allowed_choices = {v.lower(): v for v in permitted_choices}
25+
allowed_choices = {v.lower() if v else v: v for v in permitted_choices}
2626

2727
def literal_validator(v: typing.Any) -> typing.Any:
2828
try:

0 commit comments

Comments
 (0)