Skip to content

Commit d343311

Browse files
committed
fix typing
1 parent 35a41e9 commit d343311

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/asynchronous/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ async def aconnect(self) -> None:
10141014
"""Explicitly connect to MongoDB asynchronously instead of on the first operation."""
10151015
await self._get_topology()
10161016

1017-
def _init_background(self, old_pid: Optional[int] = None, first=False) -> None:
1017+
def _init_background(self, old_pid: Optional[int] = None, first: bool = False) -> None:
10181018
self._topology = Topology(self._topology_settings)
10191019
if first and _HAS_REGISTER_AT_FORK:
10201020
# Add this client to the list of weakly referenced items.

pymongo/synchronous/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ def _connect(self) -> None:
10121012
"""Explicitly connect to MongoDB synchronously instead of on the first operation."""
10131013
self._get_topology()
10141014

1015-
def _init_background(self, old_pid: Optional[int] = None, first=False) -> None:
1015+
def _init_background(self, old_pid: Optional[int] = None, first: bool = False) -> None:
10161016
self._topology = Topology(self._topology_settings)
10171017
if first and _HAS_REGISTER_AT_FORK:
10181018
# Add this client to the list of weakly referenced items.

0 commit comments

Comments
 (0)