Skip to content

Commit 17ca4ef

Browse files
committed
MB-65962 Fix git hooks
- Ignore pylint type error in `cluster_manager.py` - Shorten a line in cbmgr.py which autopep8 fails to format properly Change-Id: Id4f06642ced8ed43a77c7a77e7357ef9bb03d512 Reviewed-on: https://review.couchbase.org/c/couchbase-cli/+/225342 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Matt Hall <matt.hall@couchbase.com>
1 parent 1d72d91 commit 17ca4ef

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

cbmgr.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5204,20 +5204,20 @@ def _list(self, opts):
52045204

52055205
if statuses['apps'] is not None:
52065206
statuses = self._get_eventing_functions_paths_to_statuses_map(statuses['apps'])
5207-
for function in functions:
5208-
function_path = self._get_function_path_from_list_functions_endpoint(function)
5207+
for fn in functions:
5208+
function_path = self._get_function_path_from_list_functions_endpoint(fn)
52095209
if function_path in statuses:
52105210
print(function_path)
52115211
print(f' Status: {statuses[function_path]}')
5212-
if 'source_scope' in function["depcfg"]:
5213-
print(f' Source: {function["depcfg"]["source_bucket"]}.{function["depcfg"]["source_scope"]}.'
5214-
f'{function["depcfg"]["source_collection"]}')
5212+
if 'source_scope' in fn["depcfg"]:
5213+
print(f' Source: {fn["depcfg"]["source_bucket"]}.{fn["depcfg"]["source_scope"]}.'
5214+
f'{fn["depcfg"]["source_collection"]}')
52155215
print(
5216-
f' Metadata: {function["depcfg"]["metadata_bucket"]}.{function["depcfg"]["metadata_scope"]}.'
5217-
f'{function["depcfg"]["metadata_collection"]}')
5216+
f' Metadata: {fn["depcfg"]["metadata_bucket"]}.{fn["depcfg"]["metadata_scope"]}.'
5217+
f'{fn["depcfg"]["metadata_collection"]}')
52185218
else:
5219-
print(f' Source Bucket: {function["depcfg"]["source_bucket"]}')
5220-
print(f' Metadata Bucket: {function["depcfg"]["metadata_bucket"]}')
5219+
print(f' Source Bucket: {fn["depcfg"]["source_bucket"]}')
5220+
print(f' Metadata Bucket: {fn["depcfg"]["metadata_bucket"]}')
52215221
else:
52225222
print('The cluster has no functions')
52235223

cluster_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,14 @@ def get_server_group(self, group_name):
481481
if errors:
482482
return None, errors
483483

484+
# pylint: disable=invalid-sequence-index
484485
if not groups or not groups["groups"] or groups["groups"] == 0:
485486
return None, ["No server groups found"]
486487

487488
for group in groups["groups"]:
488489
if group["name"] == group_name:
489490
return group, None
491+
# pylint: enable=invalid-sequence-index
490492

491493
return None, [f'Group `{group_name}` not found']
492494

0 commit comments

Comments
 (0)