jedcunningham commented on PR #32053: URL: https://github.com/apache/airflow/pull/32053#issuecomment-1601865556
I lean toward kwarg only, more explicit. However, I'm not sure I like `as_setup` and `as_teardown` as instance methods. I guess that's more of a personal preference thing though. Here is why: ``` # makes sense, s1/t1 wrap w1 s1.as_setup() >> w1 >> t1.as_teardown(s1) # later in the file... s1 >> w2 >> t1 ``` Should I `s1.as_setup()` again? If I don't, what happens when I remove the original w1 lines `as_setup`? Keeping it during task instantiation avoids this problem. I don't find the "easier to convert" thing to be that big of a deal. Taskflow reuse is a valid concern though, but having a setup and non-setup share implementation isn't that difficult to pull off. My 2c, not strongly held. @uranusjr, what do 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]
