You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem is due to the fact _infer_context_manager takes caller function, using its current context, instead of the original callers context. This may be fixed for example by adding data to Generator instance, by infer_call_result that signifies its possible value types.
I'm not familiar with the codebase, it seems to me that that this is not the correct approach, but, the correct approach is to pass this data inside the context structure. But it's not clear to me how to do that.
Steps to reproduce
Current behavior
Prints [<Instance of .A at 0x...>]
Expected behavior
Prints [<Instance of .B at 0x...>]
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output2.6.2
The text was updated successfully, but these errors were encountered: