Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.
In the method binder overload matching loop, if there are multiple matches and one of the input arguments is a type instance, but one of the overloads have a different type in the same positional argument, the conversion fails here and sets an error, which will be thrown or mess with something later on even if there is a match.
There are multiple matches for the AddData call but some of them have the issue described above (like trying to convert the input type CustomData to String, since there is an overload with a String as first parameter). The error gets set and not cleared, messing with later actions.
Additional fix: overload matching for methods with named arguments and overloads with very similar signatures.
Additional: no implicit conversion to primitive bool.
AddData
call but some of them have the issue described above (like trying to convert the input typeCustomData
toString
, since there is an overload with a String as first parameter). The error gets set and not cleared, messing with later actions.Closes https://github.com/QuantConnect/Lean/issues/8011