class documentation

Define the interface that identifies a token version.

Subclasses must implement extract.

Method extract Get the token version from a token string.
@abstractmethod
def extract(self, token: str) -> tuple[TokenVersion, bool]: (source) ΒΆ

Get the token version from a token string.

Parameters
token:strThe token string to analyze.
Returns
tuple[TokenVersion, bool]A tuple containing the TokenVersion and a boolean indicating whether the token was recognized.