Skip to content

Commit 092b4f6

Browse files
committed
_Pepc: Address pylint warning
_Pepc.py:1131: Either all return statements in a function should return an expression, or none of them should. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent b0fac5b commit 092b4f6

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

pepctools/_Pepc.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,8 @@ def do_main(pman: ProcessManagerType | None = None):
11431143
raise Error(f"Please, run '{TOOLNAME} -h' for help")
11441144

11451145
if getattr(args, "list_mechanisms", None):
1146-
return _list_mechanisms(args)
1146+
_list_mechanisms(args)
1147+
return
11471148

11481149
dataset: str | None = getattr(args, "dataset", None)
11491150
cmdl = ArgParse.format_ssh_args(args)
@@ -1174,21 +1175,24 @@ def do_main(pman: ProcessManagerType | None = None):
11741175
args.func(args, pman)
11751176
elif dataset:
11761177
if no_pman:
1177-
return args.func(args, None)
1178+
args.func(args, None)
1179+
return
1180+
11781181
dspath = _get_dataset_path(dataset)
11791182
with _get_emul_pman(dspath) as emul_pman:
1180-
return args.func(args, emul_pman)
1183+
args.func(args, emul_pman)
11811184
else:
11821185
if no_pman:
1183-
return args.func(args, None)
1186+
args.func(args, None)
1187+
return
11841188

11851189
# pylint: disable-next=import-outside-toplevel
11861190
from pepclibs.helperlibs import ProcessManager
11871191

11881192
with ProcessManager.get_pman(cmdl["hostname"], username=cmdl["username"],
11891193
privkeypath=cmdl["privkey"],
11901194
timeout=cmdl["timeout"]) as _pman:
1191-
return args.func(args, _pman)
1195+
args.func(args, _pman)
11921196

11931197
def main() -> int:
11941198
"""

0 commit comments

Comments
 (0)