Skip to content

Commit 8a18886

Browse files
author
Val Brodsky
committed
Remove 3.8-specific typings
1 parent ca7f114 commit 8a18886

File tree

4 files changed

+11
-30
lines changed

4 files changed

+11
-30
lines changed

libs/labelbox/src/labelbox/schema/export_filters.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import sys
21

32
from datetime import datetime, timezone
4-
from typing import Collection, Dict, Tuple, List, Optional
5-
from labelbox.typing_imports import Literal
3+
from typing import Collection, Dict, List, Optional, Tuple
4+
5+
from typing_extensions import TypedDict
66

7-
if sys.version_info >= (3, 8):
8-
from typing import TypedDict
9-
else:
10-
from typing_extensions import TypedDict
7+
from labelbox.typing_imports import Literal
118

129
SEARCH_LIMIT_PER_EXPORT_V2 = 2_000
1310
ISO_8061_FORMAT = "%Y-%m-%dT%H:%M:%S%z"

libs/labelbox/src/labelbox/schema/export_params.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
import sys
1+
from typing import List, Optional
22

3-
from typing import Optional, List
4-
5-
EXPORT_LIMIT = 30
3+
from typing_extensions import TypedDict
64

75
from labelbox.schema.media_type import MediaType
86

9-
if sys.version_info >= (3, 8):
10-
from typing import TypedDict
11-
else:
12-
from typing_extensions import TypedDict
13-
7+
EXPORT_LIMIT = 30
148

159
class DataRowParams(TypedDict):
1610
data_row_details: Optional[bool]

libs/labelbox/src/labelbox/schema/send_to_annotate_params.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
import sys
21

3-
from typing import Optional, Dict
2+
from typing import Dict, Optional
3+
4+
from pydantic import BaseModel, model_validator
5+
from typing_extensions import TypedDict
46

57
from labelbox.schema.conflict_resolution_strategy import (
68
ConflictResolutionStrategy,
79
)
810

9-
if sys.version_info >= (3, 8):
10-
from typing import TypedDict
11-
else:
12-
from typing_extensions import TypedDict
13-
14-
from pydantic import BaseModel, model_validator
15-
1611

1712
class SendToAnnotateFromCatalogParams(BaseModel):
1813
"""

libs/labelbox/src/labelbox/typing_imports.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,4 @@
33
don't have to worry about where they should be imported from.
44
"""
55

6-
import sys
76

8-
if sys.version_info >= (3, 8):
9-
from typing import Literal
10-
else:
11-
from typing_extensions import Literal

0 commit comments

Comments
 (0)