Assign an alias to a type hint
Type hints such as defined by type_hint_identifier are automatically assigned to imports by PyO3, an extremely convenient feature. Unfortunately, there are rare cases where the type identifier can have the same name from multiple packages.
https://github.com/bufbuild/protovalidate-py/blob/871ad5faebc319b7b6c97259c0cb3f49da57f2c6/protovalidate/_protovalidate.pyi#L19 https://github.com/bufbuild/protovalidate-py/blob/871ad5faebc319b7b6c97259c0cb3f49da57f2c6/src/hints.rs#L37
I understand this is relatively niche but it would be great if we could add an alias to type_hint_identifier that is used in type annotations and added with as to the import.
Conflict handling reference:
There is a TODO to consider something like ModFoo. This may provide ProtobufMessage | Message for us which still wouldn't be much better than the number, so if going with a non-controlled approach without an explicit alias, it would be great if all members of a collision get transformed rather than one, in this case ProtobufMessage | GoogleProtobufMessage is reasonably clear.
Source: PyO3/pyo3