Skip to content

Commit 8ad7aee

Browse files
committed
Fix broken isort linting
1 parent aca4bf9 commit 8ad7aee

16 files changed

Lines changed: 26 additions & 32 deletions

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ test-python:
7070

7171
format-python:
7272
# Sort
73-
cd ${ROOT_DIR}/sdk/python; isort -rc feast tests
74-
cd ${ROOT_DIR}/tests/e2e; isort -rc .
73+
cd ${ROOT_DIR}/sdk/python; isort feast/ tests/
74+
cd ${ROOT_DIR}/tests/e2e; isort .
7575

7676
# Format
7777
cd ${ROOT_DIR}/sdk/python; black --target-version py37 feast tests
7878
cd ${ROOT_DIR}/tests/e2e; black --target-version py37 .
7979

8080
lint-python:
8181
cd ${ROOT_DIR}/sdk/python; mypy feast/ tests/
82-
cd ${ROOT_DIR}/sdk/python; isort -rc feast tests --check-only
82+
cd ${ROOT_DIR}/sdk/python; isort feast/ tests/ --check-only
8383
cd ${ROOT_DIR}/sdk/python; flake8 feast/ tests/
8484
cd ${ROOT_DIR}/sdk/python; black --check feast tests
8585

8686
cd ${ROOT_DIR}/tests/e2e; mypy bq/ redis/
87-
cd ${ROOT_DIR}/tests/e2e; isort -rc . --check-only
87+
cd ${ROOT_DIR}/tests/e2e; isort . --check-only
8888
cd ${ROOT_DIR}/tests/e2e; flake8 .
8989
cd ${ROOT_DIR}/tests/e2e; black --check .
9090

sdk/python/feast/client.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
15-
1614
import datetime
1715
import logging
1816
import multiprocessing
@@ -29,11 +27,9 @@
2927
import grpc
3028
import pandas as pd
3129
import pyarrow as pa
32-
import pyarrow.parquet as pq
3330
from google.protobuf.timestamp_pb2 import Timestamp
34-
from tensorflow_metadata.proto.v0 import statistics_pb2
31+
from pyarrow import parquet as pq
3532

36-
import feast.grpc.auth as feast_auth
3733
from feast.config import Config
3834
from feast.constants import (
3935
CONFIG_CORE_ENABLE_AUTH_KEY,
@@ -72,6 +68,7 @@
7268
from feast.core.FeatureSet_pb2 import FeatureSetStatus
7369
from feast.feature import Feature, FeatureRef
7470
from feast.feature_set import Entity, FeatureSet, FeatureSetRef
71+
from feast.grpc import auth as feast_auth
7572
from feast.grpc.grpc import create_grpc_channel
7673
from feast.job import IngestJob, RetrievalJob
7774
from feast.loaders.abstract_producer import get_producer
@@ -91,6 +88,7 @@
9188
from feast.serving.ServingService_pb2_grpc import ServingServiceStub
9289
from feast.type_map import _python_value_to_proto_value, python_type_to_feast_value_type
9390
from feast.types.Value_pb2 import Value as Value
91+
from tensorflow_metadata.proto.v0 import statistics_pb2
9492

9593
_logger = logging.getLogger(__name__)
9694

sdk/python/feast/feature_set.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from google.protobuf.timestamp_pb2 import Timestamp
2626
from pandas.api.types import is_datetime64_ns_dtype
2727
from pyarrow.lib import TimestampType
28-
from tensorflow_metadata.proto.v0 import schema_pb2
2928

3029
from feast.core.FeatureSet_pb2 import FeatureSet as FeatureSetProto
3130
from feast.core.FeatureSet_pb2 import FeatureSetMeta as FeatureSetMetaProto
@@ -42,6 +41,7 @@
4241
pa_to_feast_value_type,
4342
python_type_to_feast_value_type,
4443
)
44+
from tensorflow_metadata.proto.v0 import schema_pb2
4545

4646

4747
class FeatureSet:

sdk/python/feast/field.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
from collections import OrderedDict
1515
from typing import MutableMapping, Optional, Union
1616

17-
from tensorflow_metadata.proto.v0 import schema_pb2
18-
1917
from feast.core.FeatureSet_pb2 import FeatureSpec
2018
from feast.value_type import ValueType
19+
from tensorflow_metadata.proto.v0 import schema_pb2
2120

2221

2322
class Field:

sdk/python/feast/grpc/auth.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
1615
from http import HTTPStatus
1716

1817
import grpc
@@ -108,6 +107,7 @@ def _refresh_token(self, config: Config):
108107
return
109108

110109
import json
110+
111111
import requests
112112

113113
headers_token = {"content-type": "application/json"}
@@ -190,9 +190,10 @@ def _refresh_token(self):
190190
return
191191

192192
# Try to find ID Token from Gcloud SDK
193-
from google.auth import jwt
194193
import subprocess
195194

195+
from google.auth import jwt
196+
196197
try:
197198
cli_output = subprocess.run(
198199
["gcloud", "auth", "print-identity-token"], stdout=subprocess.PIPE

sdk/python/feast/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import fastavro
55
import pandas as pd
66
from google.protobuf.json_format import MessageToJson
7-
from tensorflow_metadata.proto.v0 import statistics_pb2
87

98
from feast.constants import CONFIG_TIMEOUT_KEY
109
from feast.constants import FEAST_DEFAULT_OPTIONS as defaults
@@ -24,6 +23,7 @@
2423
from feast.source import Source
2524
from feast.staging.storage_client import get_staging_client
2625
from feast.wait import wait_retry_backoff
26+
from tensorflow_metadata.proto.v0 import statistics_pb2
2727

2828
# Maximum no of seconds to wait until the retrieval jobs status is DONE in Feast
2929
# Currently set to the maximum query execution time limit in BigQuery

sdk/python/feast/loaders/ingest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import Iterable, List
55

66
import pandas as pd
7-
import pyarrow.parquet as pq
7+
from pyarrow import parquet as pq
88

99
from feast.constants import DATETIME_COLUMN
1010
from feast.feature_set import FeatureSet

sdk/python/requirements-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
flake8
22
black
3-
isort
3+
isort>=5
44
grpcio-tools
55
mypy-protobuf
66
pytest

sdk/python/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ google
3030
pandavro==1.5.*
3131
kafka-python==1.*
3232
tabulate==0.8.*
33-
isort
33+
isort>=5
3434
mypy
3535
mypy-protobuf
3636
pre-commit

sdk/python/tests/feast_core_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import grpc
66
from google.protobuf.timestamp_pb2 import Timestamp
77

8-
import feast.core.CoreService_pb2_grpc as Core
8+
from feast.core import CoreService_pb2_grpc as Core
99
from feast.core.CoreService_pb2 import (
1010
ApplyFeatureSetRequest,
1111
ApplyFeatureSetResponse,

0 commit comments

Comments
 (0)