From 08d85f556482c3a29e36e3b29059d99772fb8769 Mon Sep 17 00:00:00 2001 From: Patrick Ogenstad Date: Sun, 30 Jun 2024 13:03:46 +0200 Subject: [PATCH] Fix PLC0205: Class `__slots__` should be a non-string iterable --- nornir/core/configuration.py | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nornir/core/configuration.py b/nornir/core/configuration.py index 8b9a9ca7..cb0391af 100644 --- a/nornir/core/configuration.py +++ b/nornir/core/configuration.py @@ -211,7 +211,7 @@ def dict(self) -> Dict[str, Any]: class CoreConfig(object): - __slots__ = "raise_on_error" + __slots__ = ("raise_on_error",) class Parameters: raise_on_error = Parameter(default=False, envvar="NORNIR_CORE_RAISE_ON_ERROR") diff --git a/pyproject.toml b/pyproject.toml index 5ef74ddf..43fb870b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,7 +144,6 @@ ignore = [ "PERF203", # `try`-`except` within a loop incurs performance overhead "PGH004", # Use specific rule codes when using `noqa` "PIE800", # Unnecessary spread `**` - "PLC0205", # Class `__slots__` should be a non-string iterable "PLC2801", # Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function "PLR1704", # Redefining argument with the local name "PLR6201", # Use a `set` literal when testing for membership