Skip to content

Commit 0f89c82

Browse files
authored
[ldap3] Add missing stubs (#14271)
1 parent 41b117a commit 0f89c82

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ldap3.utils.ordDict # file is available only in Python 2.6

stubs/ldap3/METADATA.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
version = "2.9.*"
22
upstream_repository = "https://github.com/cannatag/ldap3"
33
requires = ["types-pyasn1"]
4-
partial_stub = true
54

65
[tool.stubtest]
7-
ignore_missing_stub = true
86
apt_dependencies = ["libkrb5-dev"]
97
# No need to install on the CI. Leaving here as information for MacOs/Windows contributors.
108
# brew_dependencies = ["krb5"]

stubs/ldap3/ldap3/utils/asn1.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ from typing import Any, Final, TypeVar, overload
44
from typing_extensions import TypeAlias
55

66
from pyasn1.codec.ber.encoder import AbstractItemEncoder
7+
from pyasn1.type.tag import TagSet
78

89
# Use _typeshed._SupportsGetItemBuffer after PEP 688
910
_SupportsGetItemBuffer: TypeAlias = SliceableBuffer | IndexableBuffer
@@ -19,6 +20,9 @@ class LDAPBooleanEncoder(AbstractItemEncoder):
1920
# Requires pyasn1 > 0.3.7
2021
def encodeValue(self, value: bool | int, asn1Spec: Unused, encodeFun: Unused, **options: Unused): ...
2122

23+
customTagMap: dict[TagSet, AbstractItemEncoder]
24+
customTypeMap: dict[int, AbstractItemEncoder]
25+
2226
def compute_ber_size(data): ...
2327
def decode_message_fast(message): ...
2428
@overload

stubs/ldap3/ldap3/version.pyi

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
__url__: str
2-
__description__: str
3-
__status__: str
1+
from typing import Final
2+
3+
__version__: Final[str]
4+
__author__: Final[str]
5+
__email__: Final[str]
6+
__url__: Final[str]
7+
__description__: Final[str]
8+
__status__: Final[str]
9+
__license__: Final[str]

0 commit comments

Comments
 (0)