Skip to content

Commit 4ec7e21

Browse files
Apply ruff/flake8-bugbear rule B008
B008 Do not perform function call in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
1 parent b81e488 commit 4ec7e21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

abi3audit/_audit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ def __rich_console__(self, console: Console, options: ConsoleOptions) -> RenderR
9696
yield f"[green]:thumbs_up: {self.so}"
9797

9898

99-
def audit(so: SharedObject, assume_minimum_abi3: PyVersion = PyVersion(3, 2)) -> AuditResult:
99+
def audit(so: SharedObject, assume_minimum_abi3: PyVersion | None = None) -> AuditResult:
100100
# We might fail to retrieve a minimum abi3 baseline if our context
101101
# (the shared object or its containing wheel) isn't actually tagged
102102
# as abi3 compatible.
103+
if assume_minimum_abi3 is None:
104+
assume_minimum_abi3 = PyVersion(3, 2)
103105
baseline = so.abi3_version(assume_lowest=assume_minimum_abi3)
104106
if baseline is None:
105107
raise AuditError("failed to determine ABI version baseline: not abi3 tagged?")

0 commit comments

Comments
 (0)