It's actually python3-apt's sourceslist.py which does the duplicate checking and software properties is passing a type, '# deb-src', which I think is an abuse of what python-apt expects. I believe it'd want a 'deb' or 'deb-src' type. So we end up in this strange situation where are not searching for the right type and cannot see if the entry we want to add is a disabled one.
It's actually python3-apt's sourceslist.py which does the duplicate checking and software properties is passing a type, '# deb-src', which I think is an abuse of what python-apt expects. I believe it'd want a 'deb' or 'deb-src' type. So we end up in this strange situation where are not searching for the right type and cannot see if the entry we want to add is a disabled one.