Skip to content

Commit 6597803

Browse files
committed
fix string typo in synchro and comment string
1 parent 0aa9075 commit 6597803

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

pymongo/asynchronous/monitor.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,9 @@ def __init__(
136136
The Topology is weakly referenced. The Pool must be exclusive to this
137137
Monitor.
138138
"""
139-
if _IS_SYNC:
140-
name = "pymongo_server_monitor_thread"
141-
else:
142-
name = "pymongo_server_monitor_task"
143139
super().__init__(
144140
topology,
145-
name,
141+
"pymongo_server_monitor_task",
146142
topology_settings.heartbeat_frequency,
147143
common.MIN_HEARTBEAT_INTERVAL,
148144
)
@@ -437,7 +433,7 @@ def __init__(self, topology: Topology, topology_settings: TopologySettings, pool
437433
"""
438434
super().__init__(
439435
topology,
440-
"pymongo_server_rtt_thread",
436+
"pymongo_server_rtt_task",
441437
topology_settings.heartbeat_frequency,
442438
common.MIN_HEARTBEAT_INTERVAL,
443439
)

pymongo/synchronous/monitor.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,9 @@ def __init__(
136136
The Topology is weakly referenced. The Pool must be exclusive to this
137137
Monitor.
138138
"""
139-
if _IS_SYNC:
140-
name = "pymongo_server_monitor_task"
141-
else:
142-
name = "pymongo_server_monitor_task"
143139
super().__init__(
144140
topology,
145-
name,
141+
"pymongo_server_monitor_thread",
146142
topology_settings.heartbeat_frequency,
147143
common.MIN_HEARTBEAT_INTERVAL,
148144
)

test/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ def __init__(self):
127127
server_api = ServerApi(MONGODB_API_VERSION)
128128
self.default_client_options["server_api"] = server_api
129129

130-
def reset(self):
131-
self.__init__()
132-
133130
@property
134131
def client_options(self):
135132
"""Return the MongoClient options for creating a duplicate client."""
@@ -864,7 +861,7 @@ def max_message_size_bytes(self):
864861

865862
def reset_client_context():
866863
if _IS_SYNC:
867-
# sync tests don't need to recreate a client context
864+
# sync tests don't need to reset a client context
868865
return
869866
client_context.client.close()
870867
client_context.client = None

test/asynchronous/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ def __init__(self):
127127
server_api = ServerApi(MONGODB_API_VERSION)
128128
self.default_client_options["server_api"] = server_api
129129

130-
def reset(self):
131-
self.__init__()
132-
133130
@property
134131
def client_options(self):
135132
"""Return the MongoClient options for creating a duplicate client."""
@@ -866,7 +863,7 @@ async def max_message_size_bytes(self):
866863

867864
async def reset_client_context():
868865
if _IS_SYNC:
869-
# sync tests don't need to recreate a client context
866+
# sync tests don't need to reset a client context
870867
return
871868
await async_client_context.client.close()
872869
async_client_context.client = None

tools/synchro.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
"async_repl_set_step_down": "repl_set_step_down",
111111
"AsyncPeriodicExecutor": "PeriodicExecutor",
112112
"async_wait_for_event": "wait_for_event",
113-
"pymongo_server_monitor_thread": "pymongo_server_monitor_task",
113+
"pymongo_server_monitor_task": "pymongo_server_monitor_thread",
114+
"pymongo_server_rtt_task": "pymongo_server_rtt_thread",
114115
}
115116

116117
docstring_replacements: dict[tuple[str, str], str] = {

0 commit comments

Comments
 (0)