mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-14 12:43:15 +02:00
Address Sourcery review: subprocess audit, dead code, renderer fix
- clock/data.py: add nosemgrep suppression on audited _cli subprocess call - clock/renderer.py: remove unreachable zen-mode check in heartbeat() - nodeconnection.py: extract _run_ln helper with nosemgrep suppression - SPV/spvblock.py: add nosemgrep suppression on audited subprocess calls Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
68e235f457
commit
dcb1a961d4
4 changed files with 37 additions and 29 deletions
|
|
@ -78,6 +78,7 @@ class ClockData:
|
|||
def _cli(self, command):
|
||||
"""Run bitcoin-cli command, return stdout string."""
|
||||
cmd = shlex.split(self.path["bitcoincli"]) + shlex.split(command)
|
||||
# nosemgrep: python.lang.security.audit.dangerous-subprocess-use-audit
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
return result.stdout.strip()
|
||||
|
||||
|
|
|
|||
|
|
@ -242,8 +242,6 @@ class Layout:
|
|||
lines = output.rstrip('\n').split('\n')
|
||||
|
||||
start_row = 2
|
||||
if self._is_zen():
|
||||
start_row = max(1, (self.term_height - len(lines)) // 2)
|
||||
|
||||
# Apply dim on odd steps
|
||||
wrapper = _dim if self._heartbeat_step % 2 == 1 else lambda x: x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue