Skip to content

Commit

Permalink
remove typing_extensions dependency (#1992)
Browse files Browse the repository at this point in the history
Co-authored-by: Adeel Hassan <ahassan@element84.com>
  • Loading branch information
AdeelH and AdeelH committed Nov 17, 2023
1 parent d173194 commit b312579
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 15 deletions.
5 changes: 2 additions & 3 deletions rastervision_core/rastervision/core/box.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import (TYPE_CHECKING, Callable, Dict, List, Optional, Sequence,
Tuple, Union)
from typing_extensions import Literal
from typing import (TYPE_CHECKING, Callable, Dict, List, Literal, Optional,
Sequence, Tuple, Union)
from pydantic import PositiveInt as PosInt, conint
import math
import random
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import (List, Optional, Union)
from typing_extensions import Literal
from typing import (List, Literal, Optional, Union)
from pydantic import conint
from enum import Enum

Expand Down
5 changes: 2 additions & 3 deletions rastervision_pipeline/rastervision/pipeline/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from typing import List, Type, Union, Optional, Callable, Dict, TYPE_CHECKING
from typing import (TYPE_CHECKING, Callable, Dict, List, Literal, Optional,
Type, Union)
import inspect
import logging

from pydantic import ( # noqa
BaseModel, create_model, Field, root_validator, validate_model,
ValidationError, validator)

from typing_extensions import Literal

from rastervision.pipeline import (registry_ as registry, rv_config_ as
rv_config)
from rastervision.pipeline.file_system import str_to_file
Expand Down
1 change: 0 additions & 1 deletion rastervision_pipeline/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
click==8.1.3
pydantic==1.10.7
typing_extensions==4.6.3
everett==3.2.0
everett[ini]==3.2.0
six==1.16.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import Union, Optional, Tuple, Any, TypeVar
from typing_extensions import Literal
from typing import Any, Literal, Optional, Tuple, TypeVar, Union
import logging

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import (TYPE_CHECKING, Any, Callable, Dict, Iterator, List,
Optional, Tuple, Union, Type)
from typing_extensions import Literal
Literal, Optional, Tuple, Union, Type)
from abc import ABC, abstractmethod
from os.path import join, isfile, basename, isdir
import warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import logging

from typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, List,
Optional, Sequence, Tuple, Union)
from typing_extensions import Literal
Literal, Optional, Sequence, Tuple, Union)
from pydantic import (PositiveFloat, PositiveInt as PosInt, constr, confloat,
conint)
from pydantic.utils import sequence_like
Expand Down

0 comments on commit b312579

Please sign in to comment.