Skip to content

Commit fa34ed2

Browse files
authored
Remove acr help command from acr query extension (#8526)
1 parent 783db00 commit fa34ed2

File tree

7 files changed

+21
-13
lines changed

7 files changed

+21
-13
lines changed

src/acrquery/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
1.0.1b2
6+
++++++
7+
* Bug fix: Removed help command that overrode default `acr -h` command.
8+
59
1.0.1
610
++++++
711
* Add: New mock files to validate query request.

src/acrquery/azext_acrquery/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from azure.cli.core import AzCommandsLoader
77
from azure.cli.core.profiles import ResourceType
8-
from azext_acrquery._help import helps
8+
from azext_acrquery._help import helps # pylint: disable=unused-import
99

1010

1111
class AcrqueryCommandsLoader(AzCommandsLoader):
@@ -16,7 +16,8 @@ def __init__(self, cli_ctx=None):
1616
acrquery_custom = CliCommandType(
1717
operations_tmpl='azext_acrquery.custom#{}',
1818
client_factory=cf_metadata)
19-
super().__init__(cli_ctx=cli_ctx, resource_type=ResourceType.MGMT_CONTAINERREGISTRY, operation_group='registries', custom_command_type=acrquery_custom)
19+
super().__init__(cli_ctx=cli_ctx, resource_type=ResourceType.MGMT_CONTAINERREGISTRY,
20+
operation_group='registries', custom_command_type=acrquery_custom)
2021

2122
def load_command_table(self, args):
2223
from azext_acrquery.commands import load_command_table

src/acrquery/azext_acrquery/_help.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55

66
from knack.help_files import helps
77

8-
9-
helps['acr'] = """
10-
type: group
11-
short-summary: KQL querying against ACR content.
12-
"""
13-
148
helps['acr query'] = """
159
type: command
1610
short-summary: Query the content in an ACR using Kusto Query Language.

src/acrquery/azext_acrquery/_params.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
def load_arguments(self, _):
1010

1111
with self.argument_context('acr query') as c:
12-
c.argument('registry_name', options_list=['--name', '-n'], validator=validate_registry_name, help='The name of the container registry that the query is run against.')
13-
c.argument('repository', help='The repository that the query is run against. If no repository is provided, the query is run at the registry level.')
12+
c.argument('registry_name', options_list=['--name', '-n'],
13+
validator=validate_registry_name,
14+
help='The name of the container registry that the query is run against.')
15+
c.argument('repository',
16+
help='The repository that the query is run against. If no repository is provided, '
17+
'the query is run at the registry level.')
1418
c.argument('kql_query', options_list=['--kql-query', '-q'], help='The KQL query to execute.')
1519
c.argument('skip_token', help='Skip token to get the next page of the query if applicable.')
1620
c.argument('username', help='Registry username')

src/acrquery/azext_acrquery/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
55

6-
from .query import create_query
6+
from .query import create_query # pylint: disable=unused-import

src/acrquery/azext_acrquery/query.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
# --------------------------------------------------------------------------------------------
55

66
from knack.log import get_logger
7-
from azure.cli.command_modules.acr._docker_utils import get_access_credentials, request_data_from_registry, RegistryAccessTokenPermission, RepoAccessTokenPermission
7+
from azure.cli.command_modules.acr._docker_utils import (
8+
get_access_credentials,
9+
request_data_from_registry,
10+
RegistryAccessTokenPermission,
11+
RepoAccessTokenPermission
12+
)
813

914
logger = get_logger(__name__)
1015

src/acrquery/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
logger.warn("Wheel is not available, disabling bdist_wheel hook")
1515

1616
# HISTORY.rst entry.
17-
VERSION = '1.0.1'
17+
VERSION = '1.0.1b2'
1818

1919
# The full list of classifiers is available at
2020
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)