anaynayak commented on a change in pull request #18807:
URL: https://github.com/apache/airflow/pull/18807#discussion_r724966829
##########
File path: airflow/providers/amazon/aws/sensors/s3_prefix.py
##########
@@ -58,7 +58,7 @@ def __init__(
self,
*,
bucket_name: str,
- prefix: str,
+ prefix: Union[str, Sequence[str]],
Review comment:
I tried to read up a bit around this since I was confused how a
Sequence[str] could represent both. I understand that a str is also a
Sequence[str] and hence it works with just Sequence[str] without the Union.
Noticed a few interesting threads in the process around
[mypy](https://github.com/python/mypy/issues/11001) and
[typing](https://github.com/python/typing/issues/256).
On a related note, I see one more occurrence of `Union[str, Sequence[str]]`
in the project for the impersonation_chain variables. Personally I prefer to
explicitly specify as `Union[str, Sequence[str]]` but can easily change this
for the current PR.
@uranusjr Let me know what you think
--
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]