Skip to content

Commit 06248e5

Browse files
committedMar 19, 2025
rf: Use list.copy() instead of list()
1 parent 22dcd39 commit 06248e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lazy_loader/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ def __getattr__(name):
9090
raise AttributeError(f"No {package_name} attribute {name}")
9191

9292
def __dir__():
93-
return list(__all__)
93+
return __all__.copy()
9494

9595
if os.environ.get("EAGER_IMPORT", ""):
9696
for attr in set(attr_to_modules.keys()) | submodules:
9797
__getattr__(attr)
9898

99-
return __getattr__, __dir__, list(__all__)
99+
return __getattr__, __dir__, __all__.copy()
100100

101101

102102
class DelayedImportErrorModule(types.ModuleType):

0 commit comments

Comments
 (0)