Skip to content
This repository was archived by the owner on May 20, 2022. It is now read-only.

Commit 841a545

Browse files
committed
comply with flake8's rules E252, W605
- "E252 missing whitespace around parameter equals" - "W605 invalid escape sequence '\.'" These errors will appear after updating 'flake8' (and its dependencies) from 3.5.0 to 3.7.6.
1 parent 6b60d55 commit 841a545

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

fd_gcp/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_env_project_id() -> str:
5757
return project_id
5858

5959

60-
def get_gce_credentials(service_account_email: str =None) -> GcpCredentials:
60+
def get_gce_credentials(service_account_email: str = None) -> GcpCredentials:
6161
"""
6262
Return credentials provided by Compute Engine service account.
6363

fd_gcp/exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ResourcePermissionDenied(Error):
4242
4343
"""
4444

45-
def __init__(self, resource: str =None, permission: str =None) -> None:
45+
def __init__(self, resource: str = None, permission: str = None) -> None:
4646
"""Constructor.
4747
4848
:param resource: a resource's ID, GRN or some other identifier
@@ -76,7 +76,7 @@ class ResourceNotFound(Error):
7676
7777
"""
7878

79-
def __init__(self, resource: str =None) -> None:
79+
def __init__(self, resource: str = None) -> None:
8080
"""Constructor.
8181
8282
:param resource: a resource's ID, GRN or some other identifier
@@ -192,7 +192,7 @@ def _detect_resource_not_found(
192192

193193
try:
194194
exc_reason = exc._get_reason().strip()
195-
re_pattern = re.compile("^(?P<resource_type>[a-zA-Z0-9_]+) (?P<resource>.+) not found\.")
195+
re_pattern = re.compile(r"^(?P<resource_type>[a-zA-Z0-9_]+) (?P<resource>.+) not found\.")
196196
re_match = re_pattern.match(exc_reason)
197197

198198
if re_match:

fd_gcp/gcp_kms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def create_key_ring(
234234
def create_crypto_key(
235235
api_client: GcpResource,
236236
key_ring_grn: str,
237-
crypto_key_id: str =None,
237+
crypto_key_id: str = None,
238238
) -> str:
239239
"""
240240
Create a crypto key within a key ring.

fd_gcp/gcp_kms_mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
def create_crypto_key(
3535
api_client: object,
3636
key_ring_grn: str,
37-
crypto_key_id: str =None,
37+
crypto_key_id: str = None,
3838
) -> str:
3939
"""
4040
Create a crypto key (mock) within a key ring.

0 commit comments

Comments
 (0)