Get the path for a token. Args: token: The token to get the path for. Returns: The path for the token.
(self, token: StateToken)
| 99 | path.unlink() |
| 100 | |
| 101 | def token_path(self, token: StateToken) -> Path: |
| 102 | """Get the path for a token. |
| 103 | |
| 104 | Args: |
| 105 | token: The token to get the path for. |
| 106 | |
| 107 | Returns: |
| 108 | The path for the token. |
| 109 | """ |
| 110 | return ( |
| 111 | self.states_directory / f"{md5(str(token).encode()).hexdigest()}.pkl" |
| 112 | ).absolute() |
| 113 | |
| 114 | async def load_state(self, token: StateToken[TOKEN_TYPE]) -> TOKEN_TYPE | None: |
| 115 | """Load a state object based on the provided token. |
no outgoing calls
no test coverage detected