dnspython is only a DNS tool, and it doesn't look in /etc/hosts or other sources of hostname data the way the system resolver would. RFC 6761 makes it clear that localhost should always resolve to 127.0.0.1 for a v4 query, and ::1 for a v6 query. We occasionally talk about adding /etc/hosts support but we've been trying to avoid it, because it would only solve part of the problem. RFC 6761 also allows DNS software to hardwire the answer, so perhaps we should do that. At any rate, if you do a special case you will be ok.
Your current code ([3]) only supports IPv4. Unless you know that is enough, I'd recommend doing IPv6 AAAA queries also, e.g.:
ans = await async_resolver.resolve(host, 'A', raise_on_no_answer=False)
if ans.rrset is not None:
# append to your hosts list here
ans = await async_resolver.resolve(host, 'AAAA', raise_on_no_answer=False)
if ans.rrset is not None:
# append to your hosts list here