Skip to content

Commit 35086c5

Browse files
fix: adjust linting errors
1 parent ca021f7 commit 35086c5

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/azure-cli-core/azure/cli/core/commands/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def execute(self, args):
517517
# TODO: Can't simply be invoked as an event because args are transformed
518518
command_preserve_casing = roughly_parse_command_with_casing(args)
519519
args = _pre_command_table_create(self.cli_ctx, args)
520-
# The index may be outdated. Make sure the command appears in the loaded command table
520+
# The index may be outdated. Make sure the command appears in the loaded command table
521521

522522
self.cli_ctx.raise_event(EVENT_INVOKER_PRE_CMD_TBL_CREATE, args=args)
523523
self.commands_loader.load_command_table(args)
@@ -634,7 +634,6 @@ def execute(self, args):
634634
extension_version = get_extension(command_source.extension_name).version
635635
except Exception: # pylint: disable=broad-except
636636
pass
637-
638637
telemetry.set_command_details(self.cli_ctx.data['command'], self.data['output'],
639638
self.cli_ctx.data['safe_params'],
640639
extension_name=extension_name, extension_version=extension_version,

src/azure-cli-core/azure/cli/core/telemetry.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ def _get_azure_cli_properties(self):
209209
set_custom_properties(result, 'InvokeTimeElapsed', str(self.invoke_time_elapsed))
210210
set_custom_properties(result, 'OutputType', self.output_type)
211211
set_custom_properties(result, 'RawCommand', self.raw_command)
212-
set_custom_properties(result, 'CommandPreserveCasing', self.command_preserve_casing or '')
212+
set_custom_properties(result, 'CommandPreserveCasing',
213+
self.command_preserve_casing or '')
213214
set_custom_properties(result, 'CmdIdxRebuildTriggered', self.cmd_idx_rebuild_triggered)
214215
set_custom_properties(result, 'Params', ','.join(self.parameters or []))
215216
set_custom_properties(result, 'PythonVersion', platform.python_version())
@@ -439,12 +440,15 @@ def set_extension_management_detail(ext_name, ext_version):
439440
content = '{}@{}'.format(ext_name, ext_version)
440441
_session.extension_management_detail = content[:512]
441442

443+
442444
@decorators.suppress_all_exceptions()
443445
def set_command_index_rebuild_triggered(cmd_idx_rebuild_triggered=False):
444446
_session.cmd_idx_rebuild_triggered = cmd_idx_rebuild_triggered
445447

448+
446449
@decorators.suppress_all_exceptions()
447-
def set_command_details(command, output_type=None, parameters=None, extension_name=None, extension_version=None, command_preserve_casing=None):
450+
def set_command_details(command, output_type=None, parameters=None, extension_name=None,
451+
extension_version=None, command_preserve_casing=None):
448452
_session.command = command
449453
_session.output_type = output_type
450454
_session.parameters = parameters

src/azure-cli-core/azure/cli/core/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ def roughly_parse_command(args):
12801280
break
12811281
return ' '.join(nouns).lower()
12821282

1283-
# @TODO: add unit test
1283+
12841284
def roughly_parse_command_with_casing(args):
12851285
# Roughly parse the command part: <az VM create> --name vm1
12861286
# Similar to knack.invocation.CommandInvoker._rudimentary_get_command, but preserves original casing
@@ -1293,6 +1293,7 @@ def roughly_parse_command_with_casing(args):
12931293
break
12941294
return ' '.join(nouns)
12951295

1296+
12961297
def is_guid(guid):
12971298
import uuid
12981299
try:

0 commit comments

Comments
 (0)