From 06248e5a2702dfb4ecd51eba95beec40d55a0770 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 19 Mar 2025 09:41:11 -0400 Subject: [PATCH] rf: Use list.copy() instead of list() --- lazy_loader/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lazy_loader/__init__.py b/lazy_loader/__init__.py index 0c60e08..05322a9 100644 --- a/lazy_loader/__init__.py +++ b/lazy_loader/__init__.py @@ -90,13 +90,13 @@ def __getattr__(name): raise AttributeError(f"No {package_name} attribute {name}") def __dir__(): - return list(__all__) + return __all__.copy() if os.environ.get("EAGER_IMPORT", ""): for attr in set(attr_to_modules.keys()) | submodules: __getattr__(attr) - return __getattr__, __dir__, list(__all__) + return __getattr__, __dir__, __all__.copy() class DelayedImportErrorModule(types.ModuleType):