From 5c58ba248e73fd331d27f03d0644fb7f20323385 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 10 Aug 2026 09:54:40 +0000 Subject: [PATCH] ruff B018 (useless expression) --- mmgen/xmrwallet/ops/submit.py | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mmgen/xmrwallet/ops/submit.py b/mmgen/xmrwallet/ops/submit.py index 5612b173..f9ff04b8 100755 --- a/mmgen/xmrwallet/ops/submit.py +++ b/mmgen/xmrwallet/ops/submit.py @@ -30,7 +30,7 @@ class OpSubmit(OpWallet): opts = ('tx_relay_daemon',) def post_mount_action(self): - self.tx # trigger an exit if no suitable transaction present + return self.tx # trigger an exit if no suitable transaction present @property def tx(self): diff --git a/pyproject.toml b/pyproject.toml index 248df27b..865fa4be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,6 @@ indent-style = "tab" [tool.ruff.lint] ignore = [ "B006", # Do not use mutable data structures for argument defaults - "B018", # Found useless expression. Either assign it to a variable or remove it. "BLE001", # Do not catch blind exception: `Exception` "E722", # bare except "I001", # Import block is un-sorted or un-formatted @@ -69,7 +68,8 @@ ignore = [ "test/*" = [ "SIM115", # open() with context manager "ASYNC230", # open() in async func - "ISC004" # Unparenthesized implicit string concatenation in collection + "ISC004", # Unparenthesized implicit string concatenation in collection + "B018" # Found useless expression. Either assign it to a variable or remove it. ] [tool.pylint.format]