Skip to content

Commit

Permalink
Python: Remove typing extension imports (#4917)
Browse files Browse the repository at this point in the history
This is a Python 3.7 relic
  • Loading branch information
Fokko authored Jun 2, 2022
1 parent 9ab94f8 commit e40705d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions python/src/iceberg/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@
# under the License.
from abc import abstractmethod
from enum import Enum, auto
from typing import Any

try:
from typing import Protocol, runtime_checkable
except ImportError: # pragma: no cover
from typing_extensions import Protocol # type: ignore
from typing_extensions import runtime_checkable
from typing import Any, Protocol, runtime_checkable


class FileContentType(Enum):
Expand Down
8 changes: 1 addition & 7 deletions python/src/iceberg/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@
"""

from abc import ABC, abstractmethod
from typing import Union

try:
from typing import Protocol, runtime_checkable
except ImportError: # pragma: no cover
from typing_extensions import Protocol # type: ignore
from typing_extensions import runtime_checkable
from typing import Protocol, Union, runtime_checkable


@runtime_checkable
Expand Down

0 comments on commit e40705d

Please sign in to comment.