class documentation

Class for accessing a mailmap file.

Class Method from_path Create Mailmap from file path.
Method __init__ Initialize Mailmap.
Method add_entry Add an entry to the mail mail.
Method lookup Lookup an identity in this mailmail.
Instance Variable _table Undocumented
def from_path(cls, path: str) -> Mailmap:

Create Mailmap from file path.

Parameters
path:strPath to mailmap file
Returns
MailmapMailmap instance
def __init__(self, map: Iterator[tuple[tuple[bytes | None, bytes | None], tuple[bytes | None, bytes | None] | None]] | None = None):

Initialize Mailmap.

Parameters
map:Iterator[tuple[tuple[bytes | None, bytes | None], tuple[bytes | None, bytes | None] | None]] | NoneOptional iterator of (canonical_identity, from_identity) tuples
def add_entry(self, canonical_identity: tuple[bytes | None, bytes | None], from_identity: tuple[bytes | None, bytes | None] | None = None):

Add an entry to the mail mail.

Any of the fields can be None, but at least one of them needs to be set.

Parameters
canonical_identity:tuple[bytes | None, bytes | None]The canonical identity (tuple)
from_identity:tuple[bytes | None, bytes | None] | NoneThe from identity (tuple)
def lookup(self, identity: bytes | tuple[bytes | None, bytes | None]) -> bytes | tuple[bytes | None, bytes | None]:

Lookup an identity in this mailmail.

Undocumented