chore(sdk): apply docformatter (#7438)

This commit is contained in:
Connor McCarthy 2022-03-18 11:02:40 -06:00 committed by GitHub
parent 2c0b38162f
commit bfffa83fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 15 deletions

View File

@ -572,9 +572,8 @@ implementation:
# pylint: disable=import-outside-toplevel,unused-import,import-error,redefined-outer-name,reimported
class V2NamespaceAliasTest(unittest.TestCase):
"""Test that imports of both modules and objects are aliased
(e.g. all import path variants work).
"""
"""Test that imports of both modules and objects are aliased (e.g. all
import path variants work)."""
# Note: The DeprecationWarning is only raised on the first import where
# the kfp.v2 module is loaded. Due to the way we run tests in CI/CD, we cannot ensure that the kfp.v2 module will first be loaded in these tests,

View File

@ -1390,7 +1390,8 @@ class Client(object):
pipeline_name: Optional[str] = None,
description: Optional[str] = None,
) -> kfp_server_api.ApiPipelineVersion:
"""Uploads a new version of the pipeline to the Kubeflow Pipelines cluster.
"""Uploads a new version of the pipeline to the Kubeflow Pipelines
cluster.
Args:
pipeline_package_path: Local path to the pipeline package.

View File

@ -131,7 +131,7 @@ def _display_experiment(exp: kfp_server_api.ApiExperiment,
)
@click.pass_context
def archive(ctx: click.Context, experiment_id: str, experiment_name: str):
"""Archive an experiment"""
"""Archive an experiment."""
client = ctx.obj["client"]
if (experiment_id is None) == (experiment_name is None):

View File

@ -136,7 +136,7 @@ def list(ctx: click.Context, page_token: str, max_size: int, sort_by: str,
@click.pass_context
def list_versions(ctx: click.Context, pipeline_id: str, page_token: str,
max_size: int, sort_by: str, filter: str):
"""List versions of an uploaded KFP pipeline"""
"""List versions of an uploaded KFP pipeline."""
client = ctx.obj["client"]
output_format = ctx.obj["output"]
@ -179,7 +179,7 @@ def delete_version(ctx: click.Context, version_id: str):
@click.argument("pipeline-id")
@click.pass_context
def get(ctx: click.Context, pipeline_id: str):
"""Get detailed information about an uploaded KFP pipeline"""
"""Get detailed information about an uploaded KFP pipeline."""
client = ctx.obj["client"]
output_format = ctx.obj["output"]

View File

@ -21,7 +21,7 @@ import kfp_server_api
@click.group()
def recurring_run():
"""Manage recurring-run resources"""
"""Manage recurring-run resources."""
pass
@ -154,7 +154,7 @@ def create(ctx: click.Context,
@click.pass_context
def list(ctx: click.Context, experiment_id: str, page_token: str, max_size: int,
sort_by: str, filter: str):
"""List recurring runs"""
"""List recurring runs."""
client = ctx.obj['client']
output_format = ctx.obj['output']
@ -178,7 +178,7 @@ def list(ctx: click.Context, experiment_id: str, page_token: str, max_size: int,
@click.argument("job-id")
@click.pass_context
def get(ctx: click.Context, job_id: str):
"""Get detailed information about an experiment"""
"""Get detailed information about an experiment."""
client = ctx.obj["client"]
output_format = ctx.obj["output"]
@ -190,7 +190,7 @@ def get(ctx: click.Context, job_id: str):
@click.argument("job-id")
@click.pass_context
def delete(ctx: click.Context, job_id: str):
"""Delete a recurring run"""
"""Delete a recurring run."""
client = ctx.obj["client"]
client.delete_job(job_id)

View File

@ -20,9 +20,9 @@ _COMPONENT_FILENAME = 'component.yaml'
class ComponentStore:
"""Component store.
Enables external components to be loaded by name and digest/tag.
Attributes:
local_search_paths: A list of local directories to include in the search.
@ -36,7 +36,7 @@ class ComponentStore:
auth=None,
uri_search_template=None):
"""Instantiates a ComponentStore including the specified locations.
Args:
local_search_paths: A list of local directories to include in the search.

View File

@ -124,7 +124,8 @@ def load_component_from_text(text):
def load_component_from_spec(component_spec):
"""Loads component from a ComponentSpec and creates a task factory function.
"""Loads component from a ComponentSpec and creates a task factory
function.
Args:
component_spec: A ComponentSpec containing the component definition.