Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (#167)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/synthtool@6fab84a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
  • Loading branch information
gcf-owl-bot[bot] authored Mar 28, 2022
1 parent 4a80f94 commit 6c46ba0
Show file tree
Hide file tree
Showing 10 changed files with 545 additions and 163 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-os-login/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
5 changes: 4 additions & 1 deletion packages/google-cloud-os-login/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

__protobuf__ = proto.module(
package="google.cloud.oslogin.v1",
manifest={"OperatingSystemType", "PosixAccount", "SshPublicKey",},
manifest={
"OperatingSystemType",
"PosixAccount",
"SshPublicKey",
},
)


Expand Down Expand Up @@ -64,19 +68,51 @@ class PosixAccount(proto.Message):
Output only. The canonical resource name.
"""

primary = proto.Field(proto.BOOL, number=1,)
username = proto.Field(proto.STRING, number=2,)
uid = proto.Field(proto.INT64, number=3,)
gid = proto.Field(proto.INT64, number=4,)
home_directory = proto.Field(proto.STRING, number=5,)
shell = proto.Field(proto.STRING, number=6,)
gecos = proto.Field(proto.STRING, number=7,)
system_id = proto.Field(proto.STRING, number=8,)
account_id = proto.Field(proto.STRING, number=9,)
primary = proto.Field(
proto.BOOL,
number=1,
)
username = proto.Field(
proto.STRING,
number=2,
)
uid = proto.Field(
proto.INT64,
number=3,
)
gid = proto.Field(
proto.INT64,
number=4,
)
home_directory = proto.Field(
proto.STRING,
number=5,
)
shell = proto.Field(
proto.STRING,
number=6,
)
gecos = proto.Field(
proto.STRING,
number=7,
)
system_id = proto.Field(
proto.STRING,
number=8,
)
account_id = proto.Field(
proto.STRING,
number=9,
)
operating_system_type = proto.Field(
proto.ENUM, number=10, enum="OperatingSystemType",
proto.ENUM,
number=10,
enum="OperatingSystemType",
)
name = proto.Field(
proto.STRING,
number=11,
)
name = proto.Field(proto.STRING, number=11,)


class SshPublicKey(proto.Message):
Expand All @@ -97,10 +133,22 @@ class SshPublicKey(proto.Message):
Output only. The canonical resource name.
"""

key = proto.Field(proto.STRING, number=1,)
expiration_time_usec = proto.Field(proto.INT64, number=2,)
fingerprint = proto.Field(proto.STRING, number=3,)
name = proto.Field(proto.STRING, number=4,)
key = proto.Field(
proto.STRING,
number=1,
)
expiration_time_usec = proto.Field(
proto.INT64,
number=2,
)
fingerprint = proto.Field(
proto.STRING,
number=3,
)
name = proto.Field(
proto.STRING,
number=4,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ def sample_delete_posix_account():

# Send the request.
await rpc(
request, retry=retry, timeout=timeout, metadata=metadata,
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

async def delete_ssh_public_key(
Expand Down Expand Up @@ -394,7 +397,10 @@ def sample_delete_ssh_public_key():

# Send the request.
await rpc(
request, retry=retry, timeout=timeout, metadata=metadata,
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

async def get_login_profile(
Expand Down Expand Up @@ -495,7 +501,12 @@ def sample_get_login_profile():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -597,7 +608,12 @@ def sample_get_ssh_public_key():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -721,7 +737,12 @@ def sample_import_ssh_public_key():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand Down Expand Up @@ -845,7 +866,12 @@ def sample_update_ssh_public_key():
)

# Send the request.
response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response
Expand All @@ -859,7 +885,9 @@ async def __aexit__(self, exc_type, exc, tb):

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution("google-cloud-os-login",).version,
gapic_version=pkg_resources.get_distribution(
"google-cloud-os-login",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
Expand Down
Loading

0 comments on commit 6c46ba0

Please sign in to comment.