o-nikolas commented on code in PR #31640:
URL: https://github.com/apache/airflow/pull/31640#discussion_r1213443596


##########
airflow/providers/amazon/aws/hooks/s3.py:
##########
@@ -425,7 +427,10 @@ def _is_in_period(input_date: datetime) -> bool:
 
         :return: a list of matched keys
         """
-        prefix = prefix or ""
+        _prefix = prefix or ""
+        wildcard_prefix = _prefix
+        if apply_wildcard and "*" in _prefix:
+            wildcard_prefix = _prefix.split("*", 1)[0]

Review Comment:
   Hmm, I'm not sure I grok that. If you don't care at all about what the 
prefix is and you're just assigning an empty string to `wildcard_prefix` then 
you can simplify a lot of this logic, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to