Skip to content

Commit 0995cc1

Browse files
author
Takashi Matsuo
authored
chore: some lint fixes (#3748)
1 parent 58011b2 commit 0995cc1

19 files changed

+39
-37
lines changed

jobs/v3/api_client/auto_complete_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import pytest
1615
import re
1716

1817
import backoff
18+
import pytest
1919

2020
import auto_complete_sample
2121

jobs/v3/api_client/base_company_sample_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
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+
import re
15+
16+
import base_company_sample
1417

1518

1619
def test_base_company_sample(capsys):
17-
import base_company_sample
18-
import re
1920

2021
base_company_sample.run_sample()
2122
out, _ = capsys.readouterr()

jobs/v3/api_client/base_job_sample_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import re
16+
17+
import base_job_sample
18+
1519

1620
def test_base_job_sample(capsys):
17-
import base_job_sample
18-
import re
1921

2022
base_job_sample.run_sample()
2123
out, _ = capsys.readouterr()

jobs/v3/api_client/batch_operation_sample_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
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+
import re
15+
16+
import batch_operation_sample
1417

1518

1619
def test_batch_operation_sample(capsys):
17-
import batch_operation_sample
18-
import re
1920

2021
batch_operation_sample.run_sample()
2122
out, _ = capsys.readouterr()

jobs/v3/api_client/commute_search_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import pytest
1615
import re
1716

1817
import backoff
18+
import pytest
1919

2020
import commute_search_sample
2121

jobs/v3/api_client/custom_attribute_sample_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
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-
import pytest
1614
import re
1715

1816
import backoff
17+
import pytest
1918

2019
import custom_attribute_sample
2120

jobs/v3/api_client/email_alert_search_sample_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
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-
import pytest
1614
import re
1715

1816
import backoff
17+
import pytest
1918

2019
import email_alert_search_sample
2120

jobs/v3/api_client/featured_job_search_sample_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
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-
import pytest
1614
import re
1715

1816
import backoff
17+
import pytest
1918

2019
import featured_job_search_sample
2120

jobs/v3/api_client/general_search_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import pytest
1615
import re
1716

1817
import backoff
18+
import pytest
1919

2020
import general_search_sample
2121

jobs/v3/api_client/histogram_sample_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
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-
import pytest
1614
import re
1715

1816
import backoff
17+
import pytest
1918

2019
import histogram_sample
2120

jobs/v3/api_client/location_search_sample_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
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-
import pytest
1614
import re
1715

1816
import backoff
17+
import pytest
1918

2019
import location_search_sample
2120

jobs/v3/api_client/quickstart_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
import pytest
1616

17+
import quickstart
18+
1719

1820
@pytest.mark.flaky
1921
def test_quickstart(capsys):
20-
import quickstart
2122

2223
quickstart.run_sample()
2324
out, _ = capsys.readouterr()

kms/api-client/snippets_test.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
import time
1717
import uuid
1818

19+
from cryptography.exceptions import InvalidSignature
20+
from cryptography.hazmat.backends import default_backend
21+
from cryptography.hazmat.primitives import hashes, serialization
22+
from cryptography.hazmat.primitives.asymmetric import padding, utils
23+
from google.cloud import kms
24+
from google.cloud.kms_v1.proto import resources_pb2
1925
import pytest
2026

2127
from create_key_asymmetric_decrypt import create_key_asymmetric_decrypt
@@ -50,14 +56,6 @@
5056
from verify_asymmetric_ec import verify_asymmetric_ec
5157
from verify_asymmetric_rsa import verify_asymmetric_rsa
5258

53-
from cryptography.exceptions import InvalidSignature
54-
from cryptography.hazmat.backends import default_backend
55-
from cryptography.hazmat.primitives import hashes, serialization
56-
from cryptography.hazmat.primitives.asymmetric import padding, utils
57-
58-
from google.cloud import kms
59-
from google.cloud.kms_v1.proto import resources_pb2
60-
6159

6260
@pytest.fixture(scope="module")
6361
def client():

monitoring/api/v3/api-client/custom_metric_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
import backoff
2929
import googleapiclient.discovery
30-
import pytest
3130
from googleapiclient.errors import HttpError
31+
import pytest
3232

3333
from custom_metric import create_custom_metric
3434
from custom_metric import delete_metric_descriptor

monitoring/api/v3/cloud-client/snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
import os
1616
import re
17-
import pytest
1817

1918
import backoff
2019
from google.api_core.exceptions import NotFound
20+
import pytest
2121

2222
import snippets
2323

pubsub/cloud-client/quickstart/pub_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
# limitations under the License.
1616

1717
import os
18-
import pytest
1918
import uuid
2019

2120
from google.api_core.exceptions import AlreadyExists
2221
from google.cloud import pubsub_v1
22+
import pytest
23+
24+
import pub # noqa
2325

24-
import pub
2526

2627
UUID = uuid.uuid4().hex
2728
PROJECT = os.environ["GCLOUD_PROJECT"]

pubsub/cloud-client/quickstart/sub_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16-
17-
import mock
1816
import os
19-
import pytest
2017
import uuid
2118

2219
from google.api_core.exceptions import AlreadyExists
2320
from google.cloud import pubsub_v1
21+
import mock
22+
import pytest
2423

25-
import sub
24+
import sub # noqa
2625

2726

2827
UUID = uuid.uuid4().hex

run/hello-broken/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
# limitations under the License.
1414

1515
# [START run_broken_service]
16-
from flask import Flask
1716
import json
1817
import os
1918
import sys
2019

20+
from flask import Flask
21+
22+
2123
app = Flask(__name__)
2224

2325

run/hello-broken/main_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
# limitations under the License.
1414

1515
import os
16+
1617
import pytest
18+
1719
import main
1820

1921

0 commit comments

Comments
 (0)