git.schokokeks.org
Repositories
Help
Report an Issue
derivepassphrase.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
99863c4
Branches
Tags
documentation-tree
master
0.1.0
0.1.1
0.1.2
0.1.3
0.2.0
0.3.0
0.3.1
0.3.2
derivepassphrase.git
src
ssh_agent_client
types.py
Reformat everything with ruff
Marco Ricci
commited
99863c4
at 2024-07-21 10:09:10
types.py
Blame
History
Raw
# SPDX-FileCopyrightText: 2024 Marco Ricci <m@the13thletter.info> # # SPDX-License-Identifier: MIT """Common typing declarations for the parent module.""" from __future__ import annotations import enum from typing import NamedTuple __all__ = ('SSH_AGENT', 'SSH_AGENTC', 'KeyCommentPair') class KeyCommentPair(NamedTuple): """SSH key plus comment pair. For typing purposes. Attributes: key: SSH key. comment: SSH key comment. """ key: bytes | bytearray comment: bytes | bytearray class SSH_AGENTC(enum.Enum): # noqa: N801 """SSH agent protocol numbers: client requests. Attributes: REQUEST_IDENTITIES: List identities. Expecting `SSH_AGENT.IDENTITIES_ANSWER`. SIGN_REQUEST: Sign data. Expecting `SSH_AGENT.SIGN_RESPONSE`. """ REQUEST_IDENTITIES: int = 11 SIGN_REQUEST: int = 13 class SSH_AGENT(enum.Enum): # noqa: N801 """SSH agent protocol numbers: server replies. Attributes: IDENTITIES_ANSWER: Successful answer to `SSH_AGENTC.REQUEST_IDENTITIES`. SIGN_RESPONSE: Successful answer to `SSH_AGENTC.SIGN_REQUEST`. """ IDENTITIES_ANSWER: int = 12 SIGN_RESPONSE: int = 14