99863c4d7b2a3ee8f7b0d0d3e3f924afe7d40fb8
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

1) # SPDX-FileCopyrightText: 2024 Marco Ricci <m@the13thletter.info>
2) #
3) # SPDX-License-Identifier: MIT
4) 
5) """Common typing declarations for the parent module."""
6) 
7) from __future__ import annotations
8) 
9) import enum
10) from typing import NamedTuple
11) 
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 3 months ago

12) __all__ = ('SSH_AGENT', 'SSH_AGENTC', 'KeyCommentPair')
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

13) 
Marco Ricci Reformat everything with ruff

Marco Ricci authored 3 months ago

14) 
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

15) class KeyCommentPair(NamedTuple):
16)     """SSH key plus comment pair.  For typing purposes.
17) 
18)     Attributes:
19)         key: SSH key.
20)         comment: SSH key comment.
21) 
22)     """
Marco Ricci Reformat everything with ruff

Marco Ricci authored 3 months ago

23) 
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

24)     key: bytes | bytearray
25)     comment: bytes | bytearray
26) 
Marco Ricci Reformat everything with ruff

Marco Ricci authored 3 months ago

27) 
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 3 months ago

28) class SSH_AGENTC(enum.Enum):  # noqa: N801
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

29)     """SSH agent protocol numbers: client requests.
30) 
31)     Attributes:
32)         REQUEST_IDENTITIES:
33)             List identities.  Expecting `SSH_AGENT.IDENTITIES_ANSWER`.
34)         SIGN_REQUEST:
35)             Sign data.  Expecting `SSH_AGENT.SIGN_RESPONSE`.
36) 
37)     """
Marco Ricci Reformat everything with ruff

Marco Ricci authored 3 months ago

38) 
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

39)     REQUEST_IDENTITIES: int = 11
40)     SIGN_REQUEST: int = 13
41) 
Marco Ricci Reformat everything with ruff

Marco Ricci authored 3 months ago

42) 
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 3 months ago

43) class SSH_AGENT(enum.Enum):  # noqa: N801
Marco Ricci Add prototype implementation

Marco Ricci authored 5 months ago

44)     """SSH agent protocol numbers: server replies.
45) 
46)     Attributes:
47)         IDENTITIES_ANSWER:
48)             Successful answer to `SSH_AGENTC.REQUEST_IDENTITIES`.
49)         SIGN_RESPONSE:
50)             Successful answer to `SSH_AGENTC.SIGN_REQUEST`.
51) 
52)     """
Marco Ricci Reformat everything with ruff

Marco Ricci authored 3 months ago

53)