Skip to content

Commit 824a414

Browse files
committed
[ot] scripts/opentitan: silence false-positive pylint warnings
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
1 parent 33d8ffb commit 824a414

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

python/qemu/ot/devproxy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,7 @@ def _notify(self) -> None:
16961696
if not dispatcher:
16971697
self._log.error('Unsupported notification: %s', handler)
16981698
continue
1699+
# pylint: disable=not-callable
16991700
dispatcher(payload)
17001701
else:
17011702
if not self._request_handler:

scripts/opentitan/.pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[MESSAGES CONTROL]
22

33
disable=
4+
unknown-option-value,
45
import-error,
56
too-few-public-methods,
67
too-many-arguments,
@@ -10,8 +11,9 @@ disable=
1011
too-many-lines,
1112
too-many-locals,
1213
too-many-nested-blocks,
14+
too-many-positional-arguments,
1315
too-many-public-methods,
1416
too-many-statements,
1517
unspecified-encoding,
1618
wrong-import-order,
17-
wrong-import-position,
19+
wrong-import-position

scripts/opentitan/gdbreplay.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ def _handle_request(self, req: bytearray):
448448
else:
449449
self._send('')
450450
return
451+
# pylint: disable=not-callable
451452
resp = handler(bytes(req[clen:]))
452453
if resp is not None:
453454
self._send(resp)
@@ -526,6 +527,7 @@ def _do_q(self, payload: bytes):
526527
handler = getattr(self, f'_do_query_{parts[0].decode().lower()}', None)
527528
if not handler:
528529
return ''
530+
# pylint: disable=not-callable
529531
return handler(bytes(parts[1]) if len(parts) > 1 else b'')
530532

531533
def _do_m(self, payload: bytes) -> str:

scripts/opentitan/gpiodev.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def _inject(self, line: str, it_cmd: Optional[GpioChecker.Iterator]) -> \
219219
return None
220220
self._log.info('Execute %s: 0x%08x', command, word)
221221
self._record.append((cmd, word))
222+
# pylint: disable=not-callable
222223
out = handler(word)
223224
if it_cmd:
224225
try:

scripts/opentitan/tap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def _inject(self, req: bytes) -> Optional[bool]:
318318
if handler is None:
319319
self._log.warning('Unimplemented handler for %s', command)
320320
return None
321+
# pylint: disable=not-callable
321322
return handler(*args)
322323

323324
def _inject_quit(self):
@@ -491,6 +492,7 @@ def update(self):
491492
f' {data:08x}' if write else '')
492493
handler = getattr(self, f'_{regname}_{opname}', None)
493494
if handler:
495+
# pylint: disable=not-callable
494496
handler(data)
495497

496498
def _dmcontrol_write(self, value: int):

0 commit comments

Comments
 (0)