Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #233

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,43 @@ ci:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.26.0
rev: v3.16.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]

- repo: https://github.com/psf/black
rev: 21.9b0
rev: 24.4.2
hooks:
- id: black
args: ["--target-version", "py36"]

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 7.1.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: mixed-line-ending

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]

- repo: https://github.com/myint/autoflake
rev: v1.4
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args:
Expand All @@ -50,6 +50,6 @@ repos:
- --remove-unused-variables

- repo: https://github.com/mgedmin/check-manifest
rev: "0.46"
rev: "0.49"
hooks:
- id: check-manifest
1 change: 1 addition & 0 deletions ldaptor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A Pure-Python Twisted library for LDAP"""

__version__ = "21.2.1.dev0"

__title__ = "ldaptor"
Expand Down
2 changes: 1 addition & 1 deletion ldaptor/_scripts/ldap2dhcpconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def my_aton_numbits(num):
n = 0
while num > 0:
n >>= 1
n |= 2 ** 31
n |= 2**31
num -= 1
return n

Expand Down
4 changes: 2 additions & 2 deletions ldaptor/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def aton_numbits(num):
n = 0
while num > 0:
n >>= 1
n |= 2 ** 31
n |= 2**31
num -= 1
return n

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

def netmaskToNumbits(netmask):
bits = aton(netmask)
i = 2 ** 31
i = 2**31
n = 0
while bits and i > 0:
if (bits & i) == 0:
Expand Down
1 change: 1 addition & 0 deletions ldaptor/ldiftree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Manage LDAP data as a tree of LDIF files.
"""

import errno
import os
import uuid
Expand Down
1 change: 1 addition & 0 deletions ldaptor/protocols/ldap/ldapsyntax.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pythonic API for LDAP operations."""

import functools

from twisted.internet import defer
Expand Down
2 changes: 1 addition & 1 deletion ldaptor/protocols/ldap/merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def queue(self, id, op):

def connectionMade(self):
clientCreator = ldapconnector.LDAPClientCreator(reactor, self.protocol)
for (c, tls) in zip(self.configs, self.use_tls):
for c, tls in zip(self.configs, self.use_tls):
d = clientCreator.connect(dn="", overrides=c.getServiceLocationOverrides())
if tls:
d.addCallback(lambda x: x.startTLS())
Expand Down
1 change: 1 addition & 0 deletions ldaptor/protocols/ldap/proxybase.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
LDAP protocol proxy server.
"""

from ldaptor.protocols.ldap import ldapserver, ldapconnector, ldaperrors
from ldaptor.protocols import pureldap
from twisted.internet import defer
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_attributeset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.attributeset
"""

from functools import total_ordering

from twisted.trial import unittest
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_autofill_samba.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.ldap.autofill.sambaAccount module.
"""

from twisted.trial import unittest

from ldaptor.protocols.ldap import ldapsyntax
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for the code from docs/source/example.
"""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_inmemory.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.inmemory module.
"""

from io import BytesIO

from twisted.trial import unittest
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_ldapclient.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.ldap.ldapsyntax module.
"""

from twisted.trial import unittest
from twisted.test import proto_helpers
from twisted.internet import defer
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_match.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.ldap.ldapserver module.
"""

import re

import attr
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_proxybase.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.ldap.proxybase module.
"""

from functools import partial
import itertools

Expand Down
5 changes: 3 additions & 2 deletions ldaptor/test/test_pureber.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.pureber module.
"""

from twisted.trial import unittest

from ldaptor.protocols import pureber
Expand Down Expand Up @@ -34,7 +35,7 @@ class BerLengths(unittest.TestCase):
(257, [0x80 | 2, 1, 1]),
(65535, [0x80 | 2, 0xFF, 0xFF]),
(65536, [0x80 | 3, 0x01, 0x00, 0x00]),
(256 ** 127 - 1, [0x80 | 127] + 127 * [0xFF]),
(256**127 - 1, [0x80 | 127] + 127 * [0xFF]),
)

def testToBER(self):
Expand All @@ -61,7 +62,7 @@ def testPartialBER(self):
pureber.BERExceptionInsufficientData, pureber.berDecodeLength, m[:1]
)

m = bytes(pureber.int2berlen(256 ** 100 - 1))
m = bytes(pureber.int2berlen(256**100 - 1))
self.assertEqual(101, len(m))
self.assertRaises(
pureber.BERExceptionInsufficientData, pureber.berDecodeLength, m[:100]
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_pureldap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.pureldap module.
"""

from twisted.trial import unittest

from ldaptor.protocols import pureldap, pureber
Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.protocols.ldap.ldapserver module.
"""

import base64
import types

Expand Down
1 change: 1 addition & 0 deletions ldaptor/test/test_usage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test cases for ldaptor.usage
"""

import re

from twisted.python.usage import UsageError
Expand Down
1 change: 1 addition & 0 deletions ldaptor/usage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command line argument/options available to various ldaptor tools.
"""

from twisted.python import usage, reflect
from twisted.python.usage import UsageError
from ldaptor.protocols import pureldap
Expand Down