From 8989eb85a56e004856832cdb69218adc73713434 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 28 Aug 2026 10:04:10 +0300 Subject: [PATCH] fix: new ruff unnecessary-dunder-call errors --- codepy/libraries.py | 2 +- codepy/toolchain.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/codepy/libraries.py b/codepy/libraries.py index 6ca1802..d5f97a7 100644 --- a/codepy/libraries.py +++ b/codepy/libraries.py @@ -100,7 +100,7 @@ def update_config(fname: str) -> None: with open(fname) as cf_file: file_contents = cf_file.read() - exec(compile(file_contents, fname, "exec"), filevars) # ruff:ignore[exec-builtin] + exec(compile(file_contents, fname, "exec"), filevars) for key, value in filevars.items(): if key != "__builtins__": diff --git a/codepy/toolchain.py b/codepy/toolchain.py index 80e0735..fecd95e 100644 --- a/codepy/toolchain.py +++ b/codepy/toolchain.py @@ -114,6 +114,7 @@ def add_library(self, if ldir not in self.library_dirs: self.library_dirs.append(ldir) + # ruff: ignore[unnecessary-dunder-call] object.__setattr__(self, "libraries", list(libraries) + self.libraries) @abstractmethod @@ -210,6 +211,7 @@ def get_version(self) -> str: return stdout def enable_debugging(self) -> None: + # ruff: ignore[unnecessary-dunder-call] object.__setattr__( self, "cflags", [f for f in self.cflags if not f.startswith("-O")] + ["-g"])