gitbita99 commented on issue #49875: URL: https://github.com/apache/airflow/issues/49875#issuecomment-4209032678
> > [@ashb](https://github.com/ashb) - Can I take a shot at this? > > My plan is to implement it by intercepting function calls in TaskDecorator.**call**, and inspecting the call stack to detect potential self-invocations caused by naming collisions between the function and the task object. If detected, I'll log a clear warning or optionally raise an informative error to help users debug it faster. Let me know if you have any suggestions before I start > > Ideally though we do that without inspecting the callstack in "happy" path cases, as looking at the call stack is expensive. Hi @ashb , I would like to work in this issue **Problem**: When users shadow imports with task name, they get a cryptic `TypeError: too many positional arguments`. **Solution**: Add exception handling in **`DecoratedOperator.__init__`** to provide a helpful hint message - only when the error occurs (No overhead). The fix catches the TypeError during signature binding, adds guidance / hint and returns it. I have a working implementation ready. Could you please assign this issue to me? -- 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]
