Skip to content

Commit b9d98c9

Browse files
committed
Typing fixes
1 parent 7ee03c9 commit b9d98c9

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.evergreen/run-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
272272
# shellcheck disable=SC2048
273273
uv run ${UV_ARGS[*]} pytest $PYTEST_ARGS
274274
PYTEST_ARGS="$PYTEST_ARGS -m asyncio"
275+
# shellcheck disable=SC2048
275276
uv run ${UV_ARGS[*]} pytest $PYTEST_ARGS
276277
else
277278
# shellcheck disable=SC2048

test/asynchronous/test_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ async def test_connect_timeout(self, simple_client):
175175

176176
async def test_types(self):
177177
with pytest.raises(TypeError):
178-
AsyncMongoClient(1)
178+
AsyncMongoClient(1) # type: ignore[arg-type]
179179
with pytest.raises(TypeError):
180-
AsyncMongoClient(1.14)
180+
AsyncMongoClient(1.14) # type: ignore[arg-type]
181181
with pytest.raises(TypeError):
182-
AsyncMongoClient("localhost", "27017")
182+
AsyncMongoClient("localhost", "27017") # type: ignore[arg-type]
183183
with pytest.raises(TypeError):
184-
AsyncMongoClient("localhost", 1.14)
184+
AsyncMongoClient("localhost", 1.14) # type: ignore[arg-type]
185185
with pytest.raises(TypeError):
186-
AsyncMongoClient("localhost", [])
186+
AsyncMongoClient("localhost", []) # type: ignore[arg-type]
187187

188188
with pytest.raises(ConfigurationError):
189189
AsyncMongoClient([])
@@ -389,11 +389,11 @@ async def test_metadata(self, simple_client):
389389

390390
# Bad "driver" options.
391391
with pytest.raises(TypeError):
392-
DriverInfo("Foo", 1, "a")
392+
DriverInfo("Foo", 1, "a") # type: ignore[arg-type]
393393
with pytest.raises(TypeError):
394-
DriverInfo(version="1", platform="a")
394+
DriverInfo(version="1", platform="a") # type: ignore[call-arg]
395395
with pytest.raises(TypeError):
396-
DriverInfo()
396+
DriverInfo() # type: ignore[call-arg]
397397
with pytest.raises(TypeError):
398398
await simple_client(driver=1)
399399
with pytest.raises(TypeError):

test/test_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ def test_connect_timeout(self, simple_client):
174174

175175
def test_types(self):
176176
with pytest.raises(TypeError):
177-
MongoClient(1)
177+
MongoClient(1) # type: ignore[arg-type]
178178
with pytest.raises(TypeError):
179-
MongoClient(1.14)
179+
MongoClient(1.14) # type: ignore[arg-type]
180180
with pytest.raises(TypeError):
181-
MongoClient("localhost", "27017")
181+
MongoClient("localhost", "27017") # type: ignore[arg-type]
182182
with pytest.raises(TypeError):
183-
MongoClient("localhost", 1.14)
183+
MongoClient("localhost", 1.14) # type: ignore[arg-type]
184184
with pytest.raises(TypeError):
185-
MongoClient("localhost", [])
185+
MongoClient("localhost", []) # type: ignore[arg-type]
186186

187187
with pytest.raises(ConfigurationError):
188188
MongoClient([])
@@ -371,11 +371,11 @@ def test_metadata(self, simple_client):
371371

372372
# Bad "driver" options.
373373
with pytest.raises(TypeError):
374-
DriverInfo("Foo", 1, "a")
374+
DriverInfo("Foo", 1, "a") # type: ignore[arg-type]
375375
with pytest.raises(TypeError):
376-
DriverInfo(version="1", platform="a")
376+
DriverInfo(version="1", platform="a") # type: ignore[call-arg]
377377
with pytest.raises(TypeError):
378-
DriverInfo()
378+
DriverInfo() # type: ignore[call-arg]
379379
with pytest.raises(TypeError):
380380
simple_client(driver=1)
381381
with pytest.raises(TypeError):

0 commit comments

Comments
 (0)