Object names in objects.inv files are not guaranteed unique; potential for incorrect doc URLs
Created by: bskinn
Describe the bug
This is a potential bug: Note that the object names within an objects.inv
are not guaranteed to be unique throughout the whole inventory. Thus, this check is risky in some possible corner cases -- you might get a docs URL for an artifact other than the one you're looking for.
I'm pretty sure they're guaranteed to be unique within a code domain (e.g., :py:
), though. If you're always looking for only Python objects, augmenting the conditional to something like if inv_obj.name == obj_name and inv_obj.domain = "py":
should avoid any collisions. Otherwise, you might need to be more specific in your selection logic.