Skip to content

Commit 4432309

Browse files
committed
add ignores
1 parent 2f656fd commit 4432309

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ disallow_any_generics = true
144144

145145
[[tool.mypy.overrides]]
146146
module = ["test.*"]
147-
disable_error_code = ["type-arg", "no-untyped-def", "no-untyped-call", "untyped-decorator"]
147+
disable_error_code = ["type-arg", "no-untyped-def", "no-untyped-call"]
148148

149149
[[tool.mypy.overrides]]
150150
module = ["service_identity.*"]

test/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def create_user(self, dbname, user, pwd=None, roles=None, **kwargs):
482482
def drop_user(self, dbname, user):
483483
self.client[dbname].command("dropUser", user, writeConcern={"w": self.w})
484484

485-
def require_connection(self, func):
485+
def require_connection(self, func: Any) -> Any:
486486
"""Run a test only if we can connect to MongoDB."""
487487
return self._require(
488488
lambda: True, # _require checks if we're connected
@@ -552,7 +552,7 @@ def require_no_fips(self, func):
552552
lambda: not self.fips_enabled, "Test cannot run on a FIPS-enabled host", func=func
553553
)
554554

555-
def require_replica_set(self, func):
555+
def require_replica_set(self, func: Any) -> Any:
556556
"""Run a test only if the client is connected to a replica set."""
557557
return self._require(lambda: self.is_rs, "Not connected to a replica set", func=func)
558558

@@ -687,7 +687,7 @@ def require_test_commands(self, func):
687687
lambda: self.test_commands_enabled, "Test commands must be enabled", func=func
688688
)
689689

690-
def require_failCommand_fail_point(self, func):
690+
def require_failCommand_fail_point(self, func: Any) -> Any:
691691
"""Run a test only if the server supports the failCommand fail
692692
point.
693693
"""

test/asynchronous/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ async def create_user(self, dbname, user, pwd=None, roles=None, **kwargs):
482482
async def drop_user(self, dbname, user):
483483
await self.client[dbname].command("dropUser", user, writeConcern={"w": self.w})
484484

485-
def require_connection(self, func):
485+
def require_connection(self, func: Any) -> Any:
486486
"""Run a test only if we can connect to MongoDB."""
487487
return self._require(
488488
lambda: True, # _require checks if we're connected
@@ -552,7 +552,7 @@ def require_no_fips(self, func):
552552
lambda: not self.fips_enabled, "Test cannot run on a FIPS-enabled host", func=func
553553
)
554554

555-
def require_replica_set(self, func):
555+
def require_replica_set(self, func: Any) -> Any:
556556
"""Run a test only if the client is connected to a replica set."""
557557
return self._require(lambda: self.is_rs, "Not connected to a replica set", func=func)
558558

@@ -687,7 +687,7 @@ def require_test_commands(self, func):
687687
lambda: self.test_commands_enabled, "Test commands must be enabled", func=func
688688
)
689689

690-
def require_failCommand_fail_point(self, func):
690+
def require_failCommand_fail_point(self, func: Any) -> Any:
691691
"""Run a test only if the server supports the failCommand fail
692692
point.
693693
"""

test/asynchronous/test_change_stream.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ async def test_split_large_change(self):
771771
class TestClusterAsyncChangeStream(TestAsyncChangeStreamBase, APITestsMixin):
772772
dbs: list
773773

774-
@async_client_context.require_version_min(4, 2, 0)
775-
@async_client_context.require_change_streams
774+
@async_client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator]
775+
@async_client_context.require_change_streams # type:ignore[untyped-decorator]
776776
async def asyncSetUp(self) -> None:
777777
await super().asyncSetUp()
778778
self.dbs = [self.db, self.client.pymongo_test_2]
@@ -831,8 +831,8 @@ async def test_full_pipeline(self):
831831

832832

833833
class TestAsyncDatabaseAsyncChangeStream(TestAsyncChangeStreamBase, APITestsMixin):
834-
@async_client_context.require_version_min(4, 2, 0)
835-
@async_client_context.require_change_streams
834+
@async_client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator]
835+
@async_client_context.require_change_streams # type:ignore[untyped-decorator]
836836
async def asyncSetUp(self) -> None:
837837
await super().asyncSetUp()
838838

test/asynchronous/test_encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class AsyncEncryptionIntegrationTest(AsyncIntegrationTest):
233233
"""Base class for encryption integration tests."""
234234

235235
@unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed")
236-
@async_client_context.require_version_min(4, 2, -1)
236+
@async_client_context.require_version_min(4, 2, -1) # type:ignore[untyped-decorator]
237237
async def asyncSetUp(self) -> None:
238238
await super().asyncSetUp()
239239

test/test_change_stream.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ def test_split_large_change(self):
757757
class TestClusterChangeStream(TestChangeStreamBase, APITestsMixin):
758758
dbs: list
759759

760-
@client_context.require_version_min(4, 2, 0)
761-
@client_context.require_change_streams
760+
@client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator]
761+
@client_context.require_change_streams # type:ignore[untyped-decorator]
762762
def setUp(self) -> None:
763763
super().setUp()
764764
self.dbs = [self.db, self.client.pymongo_test_2]
@@ -817,8 +817,8 @@ def test_full_pipeline(self):
817817

818818

819819
class TestDatabaseChangeStream(TestChangeStreamBase, APITestsMixin):
820-
@client_context.require_version_min(4, 2, 0)
821-
@client_context.require_change_streams
820+
@client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator]
821+
@client_context.require_change_streams # type:ignore[untyped-decorator]
822822
def setUp(self) -> None:
823823
super().setUp()
824824

test/test_encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class EncryptionIntegrationTest(IntegrationTest):
233233
"""Base class for encryption integration tests."""
234234

235235
@unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed")
236-
@client_context.require_version_min(4, 2, -1)
236+
@client_context.require_version_min(4, 2, -1) # type:ignore[untyped-decorator]
237237
def setUp(self) -> None:
238238
super().setUp()
239239

0 commit comments

Comments
 (0)