Skip to content

Commit

Permalink
chore: some lint fixes (#3748)
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed May 13, 2020
1 parent 58011b2 commit 0995cc1
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 37 deletions.
2 changes: 1 addition & 1 deletion jobs/v3/api_client/auto_complete_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import auto_complete_sample

Expand Down
5 changes: 3 additions & 2 deletions jobs/v3/api_client/base_company_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re

import base_company_sample


def test_base_company_sample(capsys):
import base_company_sample
import re

base_company_sample.run_sample()
out, _ = capsys.readouterr()
Expand Down
6 changes: 4 additions & 2 deletions jobs/v3/api_client/base_job_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import re

import base_job_sample


def test_base_job_sample(capsys):
import base_job_sample
import re

base_job_sample.run_sample()
out, _ = capsys.readouterr()
Expand Down
5 changes: 3 additions & 2 deletions jobs/v3/api_client/batch_operation_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re

import batch_operation_sample


def test_batch_operation_sample(capsys):
import batch_operation_sample
import re

batch_operation_sample.run_sample()
out, _ = capsys.readouterr()
Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/commute_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import commute_search_sample

Expand Down
3 changes: 1 addition & 2 deletions jobs/v3/api_client/custom_attribute_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import custom_attribute_sample

Expand Down
3 changes: 1 addition & 2 deletions jobs/v3/api_client/email_alert_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import email_alert_search_sample

Expand Down
3 changes: 1 addition & 2 deletions jobs/v3/api_client/featured_job_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import featured_job_search_sample

Expand Down
2 changes: 1 addition & 1 deletion jobs/v3/api_client/general_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import general_search_sample

Expand Down
3 changes: 1 addition & 2 deletions jobs/v3/api_client/histogram_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import histogram_sample

Expand Down
3 changes: 1 addition & 2 deletions jobs/v3/api_client/location_search_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import re

import backoff
import pytest

import location_search_sample

Expand Down
3 changes: 2 additions & 1 deletion jobs/v3/api_client/quickstart_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@

import pytest

import quickstart


@pytest.mark.flaky
def test_quickstart(capsys):
import quickstart

quickstart.run_sample()
out, _ = capsys.readouterr()
Expand Down
14 changes: 6 additions & 8 deletions kms/api-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
import time
import uuid

from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding, utils
from google.cloud import kms
from google.cloud.kms_v1.proto import resources_pb2
import pytest

from create_key_asymmetric_decrypt import create_key_asymmetric_decrypt
Expand Down Expand Up @@ -50,14 +56,6 @@
from verify_asymmetric_ec import verify_asymmetric_ec
from verify_asymmetric_rsa import verify_asymmetric_rsa

from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding, utils

from google.cloud import kms
from google.cloud.kms_v1.proto import resources_pb2


@pytest.fixture(scope="module")
def client():
Expand Down
2 changes: 1 addition & 1 deletion monitoring/api/v3/api-client/custom_metric_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

import backoff
import googleapiclient.discovery
import pytest
from googleapiclient.errors import HttpError
import pytest

from custom_metric import create_custom_metric
from custom_metric import delete_metric_descriptor
Expand Down
2 changes: 1 addition & 1 deletion monitoring/api/v3/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import os
import re
import pytest

import backoff
from google.api_core.exceptions import NotFound
import pytest

import snippets

Expand Down
5 changes: 3 additions & 2 deletions pubsub/cloud-client/quickstart/pub_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
# limitations under the License.

import os
import pytest
import uuid

from google.api_core.exceptions import AlreadyExists
from google.cloud import pubsub_v1
import pytest

import pub # noqa

import pub

UUID = uuid.uuid4().hex
PROJECT = os.environ["GCLOUD_PROJECT"]
Expand Down
7 changes: 3 additions & 4 deletions pubsub/cloud-client/quickstart/sub_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import mock
import os
import pytest
import uuid

from google.api_core.exceptions import AlreadyExists
from google.cloud import pubsub_v1
import mock
import pytest

import sub
import sub # noqa


UUID = uuid.uuid4().hex
Expand Down
4 changes: 3 additions & 1 deletion run/hello-broken/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
# limitations under the License.

# [START run_broken_service]
from flask import Flask
import json
import os
import sys

from flask import Flask


app = Flask(__name__)


Expand Down
2 changes: 2 additions & 0 deletions run/hello-broken/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# limitations under the License.

import os

import pytest

import main


Expand Down

0 comments on commit 0995cc1

Please sign in to comment.