Skip to content

Commit 5f1b855

Browse files
committed
lint
1 parent 24b8aee commit 5f1b855

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

bindings/python/pymongocrypt/mongocrypt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(self, options, callback):
5252
if not isinstance(options, MongoCryptOptions):
5353
raise TypeError("options must be a MongoCryptOptions")
5454

55-
if not isinstance(callback, (AsyncMongoCryptCallback, MongoCryptCallback)):
55+
if not isinstance(callback, AsyncMongoCryptCallback | MongoCryptCallback):
5656
raise TypeError(
5757
"callback must be a MongoCryptCallback or AsyncMongoCryptCallback"
5858
)

bindings/python/pymongocrypt/options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,23 @@ def __init__(
114114
f"kms_providers[{name!r}] must contain "
115115
"'email' and 'privateKey'"
116116
)
117-
if not isinstance(provider["privateKey"], (bytes, unicode_type)):
117+
if not isinstance(provider["privateKey"], bytes | unicode_type):
118118
raise TypeError(
119119
f"kms_providers[{name!r}]['privateKey'] must "
120120
"be an instance of bytes or str"
121121
)
122122
elif provider_type == "kmip":
123123
if "endpoint" not in provider:
124124
raise ValueError(f"kms_providers[{name!r}] must contain 'endpoint'")
125-
if not isinstance(provider["endpoint"], (str, unicode_type)):
125+
if not isinstance(provider["endpoint"], str | unicode_type):
126126
raise TypeError(
127127
f"kms_providers[{name!r}]['endpoint'] must "
128128
"be an instance of str"
129129
)
130130
elif provider_type == "local":
131131
if "key" not in provider:
132132
raise ValueError(f"kms_providers[{name!r}] must contain 'key'")
133-
if not isinstance(provider["key"], (bytes, unicode_type)):
133+
if not isinstance(provider["key"], bytes | unicode_type):
134134
raise TypeError(
135135
f"kms_providers[{name!r}]['key'] must be an "
136136
"instance of bytes or str"

bindings/python/test/performance/perf_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import time
2121
import unittest
2222
from concurrent.futures import ThreadPoolExecutor
23-
from typing import List
2423

2524
try:
2625
import simplejson as json
@@ -52,7 +51,7 @@
5251

5352
OUTPUT_FILE = os.environ.get("OUTPUT_FILE")
5453

55-
result_data: List = []
54+
result_data: list = []
5655

5756

5857
def read(filename, **kwargs):

0 commit comments

Comments
 (0)