You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/02 18:28:54 UTC
[GitHub] [airflow] baryluk commented on a change in pull request #17325: s3 unify_bucket_name_and_key simplify
baryluk commented on a change in pull request #17325:
URL: https://github.com/apache/airflow/pull/17325#discussion_r681183778
##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -75,15 +75,10 @@ def unify_bucket_name_and_key(func: T) -> T:
def wrapper(*args, **kwargs) -> T:
bound_args = function_signature.bind(*args, **kwargs)
- def get_key_name() -> Optional[str]:
- if 'wildcard_key' in bound_args.arguments:
- return 'wildcard_key'
- if 'key' in bound_args.arguments:
- return 'key'
+ key_name = 'wildcard_key' if 'wildcard_key' in bound_args.arguments else 'key'
+ if key_name not in bound_args.arguments:
Review comment:
Oops. This is totally a typo! Fixing now.
Should have been `if 'bucket' not in ...`.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org