Skip to content

Commit

Permalink
Remove workaround for python<3.8 to silence pylint.
Browse files Browse the repository at this point in the history
TF-GNN has required python>=3.8 since r0.5 from January 2023.

PiperOrigin-RevId: 666839656
  • Loading branch information
arnoegw authored and tensorflower-gardener committed Aug 23, 2024
1 parent 6ae036a commit 3f61996
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tensorflow_gnn/runner/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,11 @@

import abc
import dataclasses
import sys
from typing import Callable, Mapping, Optional, Sequence, TypeVar, Union
from typing import Callable, Mapping, Optional, Sequence, TypeVar, Union, Protocol, runtime_checkable

import tensorflow as tf
import tensorflow_gnn as tfgnn

# pylint:disable=g-import-not-at-top
if sys.version_info >= (3, 8):
from typing import Protocol
from typing import runtime_checkable
else:
from typing_extensions import Protocol
from typing_extensions import runtime_checkable
# pylint:enable=g-import-not-at-top

T = TypeVar("T")
OneOrMappingOf = Union[T, Mapping[str, T]]
OneOrSequenceOf = Union[T, Sequence[T]]
Expand Down

0 comments on commit 3f61996

Please sign in to comment.