From 7af50228b538d5018e00a4b3e16322a09bfe2ebe Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Thu, 19 Jan 2023 09:54:44 +0100 Subject: [PATCH] Add an explanation on an obscure bit of the code. --- lolafect/lolaconfig.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lolafect/lolaconfig.py b/lolafect/lolaconfig.py index 1a645c4..3cb05fe 100644 --- a/lolafect/lolaconfig.py +++ b/lolafect/lolaconfig.py @@ -24,6 +24,9 @@ def _needs_env_data(method: Callable) -> Callable: """ def wrapper(self, *args, **kwargs): + # Many methods that use this decorator used to provide the option of passing in + # an s3_reader different than the default one. Here, we check if the kwargs + # contain one and, if so, use that instead of the default one. self.fetch_env_data(kwargs.get("s3_reader", None)) return method(self, *args, **kwargs)