10000 when looking for a custom argument converter look at base types too · pythonnet/pythonnet@f1e2920 · GitHub
[go: up one dir, main page]

Skip to content

Commit f1e2920

Browse files
committed
when looking for a custom argument converter look at base types too
1 parent b5b0c69 commit f1e2920

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/methodbinder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ static PyArgConverterAttribute TryGetArgConverter(Type type) {
200200

201201
return ArgConverterCache.GetOrAdd(type, declaringType =>
202202
declaringType
203-
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: false)
203+
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: true)
204204
.OfType<PyArgConverterAttribute>()
205205
.SingleOrDefault()
206206
?? declaringType.Assembly
207-
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: false)
207+
.GetCustomAttributes(typeof(PyArgConverterAttribute), inherit: true)
208208
.OfType<PyArgConverterAttribute>()
209209
.SingleOrDefault()
210210
);

0 commit comments

Comments
 (0)
0