-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Python] Fix incorrect description when set a property #6372
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,7 @@ def list(ctx: Context, parent: Optional[str]): # pylint: disable=redefined-buil | |
@click.pass_context | ||
@catch_exception() | ||
def describe(ctx: Context, entity: Literal["name", "namespace", "table"], identifier: str): | ||
"""Describes a namespace xor table""" | ||
"""Describes a namespace or a table""" | ||
catalog, output = _catalog_and_output(ctx) | ||
identifier_tuple = Catalog.identifier_to_tuple(identifier) | ||
|
||
|
@@ -198,7 +198,7 @@ def drop(): | |
@click.pass_context | ||
@catch_exception() | ||
def table(ctx: Context, identifier: str): # noqa: F811 | ||
"""Drop table""" | ||
"""Drops a table""" | ||
catalog, output = _catalog_and_output(ctx) | ||
|
||
catalog.drop_table(identifier) | ||
|
@@ -210,7 +210,7 @@ def table(ctx: Context, identifier: str): # noqa: F811 | |
@click.pass_context | ||
@catch_exception() | ||
def namespace(ctx, identifier: str): | ||
"""Drop namespace""" | ||
"""Drops a namespace""" | ||
catalog, output = _catalog_and_output(ctx) | ||
|
||
catalog.drop_namespace(identifier) | ||
|
@@ -286,7 +286,7 @@ def get_table(ctx: Context, identifier: str, property_name: str): | |
|
||
@properties.group() | ||
def set(): | ||
"""Removes properties on tables/namespaces""" | ||
"""Sets a property on tables/namespaces""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [minor] should we update this line as well : There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank you @singhpk234 , updated per your suggestion |
||
|
||
|
||
@set.command() # type: ignore | ||
|
@@ -296,7 +296,7 @@ def set(): | |
@click.pass_context | ||
@catch_exception() | ||
def namespace(ctx: Context, identifier: str, property_name: str, property_value: str): # noqa: F811 | ||
"""Sets a property of a namespace or table""" | ||
"""Sets a property on a namespace""" | ||
catalog, output = _catalog_and_output(ctx) | ||
|
||
catalog.update_namespace_properties(identifier, updates={property_name: property_value}) | ||
|
@@ -321,7 +321,7 @@ def table(ctx: Context, identifier: str, property_name: str, property_value: str | |
|
||
@properties.group() | ||
def remove(): | ||
"""Removes properties on tables/namespaces""" | ||
"""Removes a property from tables/namespaces""" | ||
|
||
|
||
@remove.command() # type: ignore | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually a bad joke. If you have hierarchical namespaces, then it will describe the namespace,
namespace.namespace.table
, in the case of a tablenamespace.table
it would describe the table. But wouldn't do both (because that's not possible). But I agree that this is better :)