Skip to content

Commit 3521d87

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9ed5a64 commit 3521d87

25 files changed

+44
-25
lines changed

SECURITY.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Security Policy
22

3-
twisted/ldaptor project uses the same security policy as [twisted/twisted](https://github.com/twisted/twisted).
3+
twisted/ldaptor project uses the same security policy as
4+
[twisted/twisted](https://github.com/twisted/twisted).
45

5-
For more details please check the [Twisted security process](https://github.com/twisted/twisted?tab=security-ov-file#readme)
6+
For more details please check the
7+
[Twisted security process](https://github.com/twisted/twisted?tab=security-ov-file#readme)
68

7-
You can send a security report via [GitHub Security Advisories](https://github.com/twisted/ldaptor/security/advisories/new)
9+
You can send a security report via
10+
[GitHub Security Advisories](https://github.com/twisted/ldaptor/security/advisories/new)

docs/source/examples/ldaptor_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#! /usr/bin/env python
22

33
"""
4-
Testing a simple ldaptor ldap server
5-
Base on an example by Gaston TJEBBES aka "tonthon":
6-
http://tonthon.blogspot.com/2011/02/ldaptor-ldap-with-twisted-server-side.html
4+
Testing a simple ldaptor ldap server
5+
Base on an example by Gaston TJEBBES aka "tonthon":
6+
http://tonthon.blogspot.com/2011/02/ldaptor-ldap-with-twisted-server-side.html
77
"""
88

99
import tempfile, sys

ldaptor/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A Pure-Python Twisted library for LDAP"""
2+
23
__version__ = "21.2.1.dev0"
34

45
__title__ = "ldaptor"

ldaptor/_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Encoding / decoding utilities
2+
Encoding / decoding utilities
33
"""
44

55
import warnings

ldaptor/_scripts/ldap2dhcpconf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def my_aton_numbits(num):
3030
n = 0
3131
while num > 0:
3232
n >>= 1
33-
n |= 2 ** 31
33+
n |= 2**31
3434
num -= 1
3535
return n
3636

ldaptor/dns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def aton_numbits(num):
1313
n = 0
1414
while num > 0:
1515
n >>= 1
16-
n |= 2 ** 31
16+
n |= 2**31
1717
num -= 1
1818
return n
1919

@@ -35,7 +35,7 @@ def ntoa(n):
3535

3636
def netmaskToNumbits(netmask):
3737
bits = aton(netmask)
38-
i = 2 ** 31
38+
i = 2**31
3939
n = 0
4040
while bits and i > 0:
4141
if (bits & i) == 0:

ldaptor/ldiftree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Manage LDAP data as a tree of LDIF files.
33
"""
4+
45
import errno
56
import os
67
import uuid

ldaptor/protocols/ldap/ldapsyntax.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Pythonic API for LDAP operations."""
2+
23
import functools
34

45
from twisted.internet import defer

ldaptor/protocols/ldap/merger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""LDAP protocol server, which acts as a proxy which
2-
forwards the requests to multiple LDAP servers and
3-
merges the results.
4-
Only Bind and Search requests are supported.
2+
forwards the requests to multiple LDAP servers and
3+
merges the results.
4+
Only Bind and Search requests are supported.
55
"""
66

77
from twisted.internet import reactor, defer
@@ -82,7 +82,7 @@ def queue(self, id, op):
8282

8383
def connectionMade(self):
8484
clientCreator = ldapconnector.LDAPClientCreator(reactor, self.protocol)
85-
for (c, tls) in zip(self.configs, self.use_tls):
85+
for c, tls in zip(self.configs, self.use_tls):
8686
d = clientCreator.connect(dn="", overrides=c.getServiceLocationOverrides())
8787
if tls:
8888
d.addCallback(lambda x: x.startTLS())

ldaptor/protocols/ldap/proxybase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
LDAP protocol proxy server.
33
"""
4+
45
from ldaptor.protocols.ldap import ldapserver, ldapconnector, ldaperrors
56
from ldaptor.protocols import pureldap
67
from twisted.internet import defer

0 commit comments

Comments
 (0)