Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: some lint fixes #3750

Merged
merged 1 commit into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion speech/microphone/transcribe_streaming_infinite.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

# [START speech_transcribe_infinite_streaming]

import time
import re
import sys
import time

from google.cloud import speech
import pyaudio
Expand Down
4 changes: 3 additions & 1 deletion storage/api/crud_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
import re
import tempfile

from crud_object import main
import pytest

from crud_object import main


BUCKET = os.environ['CLOUD_STORAGE_BUCKET']


Expand Down
14 changes: 7 additions & 7 deletions storage/cloud-client/acl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
from google.cloud import storage
import pytest

import storage_remove_file_owner
import storage_remove_bucket_owner
import storage_remove_bucket_default_owner
import storage_add_file_owner
import storage_add_bucket_owner
import storage_add_bucket_default_owner
import storage_print_bucket_acl_for_user
import storage_add_bucket_owner
import storage_add_file_owner
import storage_print_bucket_acl
import storage_print_file_acl_for_user
import storage_print_bucket_acl_for_user
import storage_print_file_acl
import storage_print_file_acl_for_user
import storage_remove_bucket_default_owner
import storage_remove_bucket_owner
import storage_remove_file_owner

# Typically we'd use a @example.com address, but GCS requires a real Google
# account.
Expand Down
16 changes: 8 additions & 8 deletions storage/cloud-client/bucket_lock_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
import uuid

from google.cloud import storage

import pytest

import storage_set_retention_policy
import storage_lock_retention_policy
import storage_get_retention_policy
import storage_get_default_event_based_hold
import storage_enable_default_event_based_hold
import storage_disable_default_event_based_hold
import storage_set_event_based_hold
import storage_enable_default_event_based_hold
import storage_get_default_event_based_hold
import storage_get_retention_policy
import storage_lock_retention_policy
import storage_release_event_based_hold
import storage_set_temporary_hold
import storage_release_temporary_hold
import storage_remove_retention_policy
import storage_set_event_based_hold
import storage_set_retention_policy
import storage_set_temporary_hold


BLOB_NAME = "storage_snippets_test_sigil"
BLOB_CONTENT = "Hello, is it me you're looking for?"
Expand Down
3 changes: 2 additions & 1 deletion storage/cloud-client/encryption_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@

import storage_download_encrypted_file
import storage_generate_encryption_key
import storage_upload_encrypted_file
import storage_rotate_encryption_key
import storage_upload_encrypted_file


BUCKET = os.environ["CLOUD_STORAGE_BUCKET"]

Expand Down
2 changes: 1 addition & 1 deletion storage/cloud-client/hmac_samples_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import os

from google.cloud import storage
import google.api_core.exceptions
from google.cloud import storage
import pytest

import storage_activate_hmac_key
Expand Down
12 changes: 7 additions & 5 deletions storage/cloud-client/iam_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud import storage
import pytest
import re
import time
import uuid

import storage_remove_bucket_iam_member
import storage_add_bucket_iam_member
from google.cloud import storage
import pytest

import storage_add_bucket_conditional_iam_binding
import storage_view_bucket_iam_members
import storage_add_bucket_iam_member
import storage_remove_bucket_conditional_iam_binding
import storage_remove_bucket_iam_member
import storage_view_bucket_iam_members


MEMBER = "group:[email protected]"
ROLE = "roles/storage.legacyBucketReader"
Expand Down
2 changes: 1 addition & 1 deletion storage/cloud-client/requester_pays_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import pytest

import storage_disable_requester_pays
import storage_enable_requester_pays
import storage_download_file_requester_pays
import storage_enable_requester_pays
import storage_get_requester_pays_status


Expand Down
26 changes: 13 additions & 13 deletions storage/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@
import pytest
import requests

import storage_copy_file
import storage_add_bucket_label
import storage_copy_file
import storage_delete_file
import storage_disable_bucket_lifecycle_management
import storage_disable_versioning
import storage_download_file
import storage_enable_bucket_lifecycle_management
import storage_enable_versioning
import storage_generate_signed_post_policy_v4
import storage_generate_signed_url_v2
import storage_generate_signed_url_v4
import storage_generate_upload_signed_url_v4
import storage_get_bucket_labels
import storage_get_bucket_metadata
import storage_get_metadata
import storage_set_metadata
import storage_list_buckets
import storage_list_files_with_prefix
import storage_list_files
import storage_list_files_with_prefix
import storage_make_public
import storage_remove_bucket_label
import storage_move_file
import storage_remove_bucket_label
import storage_set_bucket_default_kms_key
import storage_set_metadata
import storage_upload_file
import storage_upload_with_kms_key
import storage_generate_signed_url_v2
import storage_generate_signed_url_v4
import storage_generate_upload_signed_url_v4
import storage_generate_signed_post_policy_v4
import storage_set_bucket_default_kms_key
import storage_enable_versioning
import storage_disable_versioning
import storage_enable_bucket_lifecycle_management
import storage_disable_bucket_lifecycle_management

KMS_KEY = os.environ["CLOUD_KMS_KEY"]

Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_add_bucket_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_add_bucket_label]
from google.cloud import storage
import pprint
# [END storage_add_bucket_label]
import sys
# [START storage_add_bucket_label]

from google.cloud import storage


def add_bucket_label(bucket_name):
Expand Down
6 changes: 4 additions & 2 deletions storage/cloud-client/storage_download_encrypted_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START storage_download_encrypted_file]
import base64
# [END storage_download_encrypted_file]
import sys

# [START storage_download_encrypted_file]

from google.cloud import storage
import base64


def download_encrypted_blob(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_generate_signed_post_policy_v4]
from google.cloud import storage
import datetime
# [END storage_generate_signed_post_policy_v4]
import sys
# [START storage_generate_signed_post_policy_v4]

from google.cloud import storage


def generate_signed_post_policy_v4(bucket_name, blob_name):
Expand Down
6 changes: 4 additions & 2 deletions storage/cloud-client/storage_generate_signed_url_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START storage_generate_signed_url_v2]
import datetime
# [END storage_generate_signed_url_v2]
import sys

# [START storage_generate_signed_url_v2]

from google.cloud import storage
import datetime


def generate_signed_url(bucket_name, blob_name):
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_generate_signed_url_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_generate_signed_url_v4]
from google.cloud import storage
import datetime
# [END storage_generate_signed_url_v4]
import sys
# [START storage_generate_signed_url_v4]

from google.cloud import storage


def generate_download_signed_url_v4(bucket_name, blob_name):
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_generate_upload_signed_url_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_generate_upload_signed_url_v4]
from google.cloud import storage
import datetime
# [END storage_generate_upload_signed_url_v4]
import sys
# [START storage_generate_upload_signed_url_v4]

from google.cloud import storage


def generate_upload_signed_url_v4(bucket_name, blob_name):
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_get_bucket_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_get_bucket_labels]
from google.cloud import storage
import pprint
# [END storage_get_bucket_labels]
import sys
# [START storage_get_bucket_labels]

from google.cloud import storage


def get_bucket_labels(bucket_name):
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_get_bucket_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_get_bucket_metadata]
from google.cloud import storage
import pprint
# [END storage_get_bucket_metadata]
import sys
# [START storage_get_bucket_metadata]

from google.cloud import storage


def bucket_metadata(bucket_name):
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_remove_bucket_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_remove_bucket_label]
from google.cloud import storage
import pprint
# [END storage_remove_bucket_label]
import sys
# [START storage_remove_bucket_label]

from google.cloud import storage


def remove_bucket_label(bucket_name):
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_rotate_encryption_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_rotate_encryption_key]
from google.cloud import storage
import base64
# [END storage_rotate_encryption_key]
import sys
# [START storage_rotate_encryption_key]

from google.cloud import storage


def rotate_encryption_key(
Expand Down
7 changes: 5 additions & 2 deletions storage/cloud-client/storage_upload_encrypted_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

# [START storage_upload_encrypted_file]
from google.cloud import storage
import base64
# [END storage_upload_encrypted_file]
import sys
# [START storage_upload_encrypted_file]

from google.cloud import storage


def upload_encrypted_blob(
Expand Down
3 changes: 1 addition & 2 deletions storage/cloud-client/uniform_bucket_level_access_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
import time

from google.cloud import storage

import pytest

import storage_get_uniform_bucket_level_access
import storage_disable_uniform_bucket_level_access
import storage_enable_uniform_bucket_level_access
import storage_get_uniform_bucket_level_access


@pytest.fixture()
Expand Down
Loading