Skip to content

Commit 82cbd97

Browse files
committed
autoupdate pc hooks
1 parent d4df743 commit 82cbd97

File tree

6 files changed

+15
-18
lines changed

6 files changed

+15
-18
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
fail_fast: false
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.4.0
4+
rev: v4.5.0
55
hooks:
66
- id: check-merge-conflict
77
- id: debug-statements
88
- id: trailing-whitespace
99
- id: end-of-file-fixer
1010
- repo: https://github.com/ambv/black
11-
rev: 23.9.1
11+
rev: 24.2.0
1212
hooks:
1313
- id: black
1414
- repo: https://github.com/pycqa/flake8
15-
rev: 6.1.0
15+
rev: 7.0.0
1616
hooks:
1717
- id: flake8
1818
additional_dependencies:
1919
- importlib_metadata<5
2020
- repo: https://github.com/asottile/pyupgrade
21-
rev: v3.14.0
21+
rev: v3.15.1
2222
hooks:
2323
- id: pyupgrade
2424
args: [--py36-plus]
2525
- repo: https://github.com/pycqa/isort
26-
rev: 5.12.0
26+
rev: 5.13.2
2727
hooks:
2828
- id: isort

benchmarks/test_basic_doc_ops.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,9 @@ def save_book():
6060
print("Save to database: %.3fus" % (timeit(save_book, 100) * 10**6))
6161

6262
son = b.to_mongo()
63-
print(
64-
"Load from SON: %.3fus" % (timeit(lambda: Book._from_son(son), 1000) * 10**6)
65-
)
63+
print("Load from SON: %.3fus" % (timeit(lambda: Book._from_son(son), 1000) * 10**6))
6664

67-
print(
68-
"Load from database: %.3fus" % (timeit(lambda: Book.objects[0], 100) * 10**6)
69-
)
65+
print("Load from database: %.3fus" % (timeit(lambda: Book.objects[0], 100) * 10**6))
7066

7167
def create_and_delete_book():
7268
b = init_book()
@@ -116,13 +112,11 @@ def save_company():
116112

117113
son = company.to_mongo()
118114
print(
119-
"Load from SON: %.3fms"
120-
% (timeit(lambda: Company._from_son(son), 100) * 10**3)
115+
"Load from SON: %.3fms" % (timeit(lambda: Company._from_son(son), 100) * 10**3)
121116
)
122117

123118
print(
124-
"Load from database: %.3fms"
125-
% (timeit(lambda: Company.objects[0], 100) * 10**3)
119+
"Load from database: %.3fms" % (timeit(lambda: Company.objects[0], 100) * 10**3)
126120
)
127121

128122
def create_and_delete_company():

mongoengine/mongodb_support.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Helper functions, constants, and types to aid with MongoDB version support
33
"""
4+
45
from mongoengine.connection import get_connection
56

67
# Constant that can be used to compare the version retrieved with

mongoengine/pymongo_support.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Helper functions, constants, and types to aid with PyMongo support.
33
"""
4+
45
import pymongo
56
from bson import binary, json_util
67
from pymongo.errors import OperationFailure

mongoengine/signals.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def _fail(self, *args, **kwargs):
3838
)
3939

4040
send = lambda *a, **kw: None # noqa
41-
connect = (
42-
disconnect
43-
) = has_receivers_for = receivers_for = temporarily_connected_to = _fail
41+
connect = disconnect = has_receivers_for = receivers_for = (
42+
temporarily_connected_to
43+
) = _fail
4444
del _fail
4545

4646

tests/all_warnings/test_warnings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
only get triggered on first hit. This way we can ensure its imported into the
44
top level and called first by the test suite.
55
"""
6+
67
import unittest
78
import warnings
89

0 commit comments

Comments
 (0)