From b29d615f243470541d86b4333ca4ffebb2fd4ea9 Mon Sep 17 00:00:00 2001 From: Sophia Yang Date: Fri, 15 May 2026 11:24:29 -0400 Subject: [PATCH] indentation fix --- pymongo/asynchronous/pool.py | 22 +++++++++++----------- pymongo/synchronous/pool.py | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pymongo/asynchronous/pool.py b/pymongo/asynchronous/pool.py index 0c2d1cd72..b93230982 100644 --- a/pymongo/asynchronous/pool.py +++ b/pymongo/asynchronous/pool.py @@ -863,18 +863,18 @@ class Pool: async with self._conns_lock: self.conns = keep - if close: - async with self.lock: - self.state = PoolState.CLOSED - # Clear the wait queue - async with self._max_connecting_cond: - self._max_connecting_cond.notify_all() - async with self.size_cond: - self.size_cond.notify_all() + if close: + async with self.lock: + self.state = PoolState.CLOSED + # Clear the wait queue + async with self._max_connecting_cond: + self._max_connecting_cond.notify_all() + async with self.size_cond: + self.size_cond.notify_all() - if interrupt_connections: - for context in self.active_contexts.copy(): - context.cancel() + if interrupt_connections: + for context in self.active_contexts.copy(): + context.cancel() listeners = self.opts._event_listeners # CMAP spec says that close() MUST close sockets before publishing the diff --git a/pymongo/synchronous/pool.py b/pymongo/synchronous/pool.py index 9d78f5994..89730c21c 100644 --- a/pymongo/synchronous/pool.py +++ b/pymongo/synchronous/pool.py @@ -861,18 +861,18 @@ class Pool: with self._conns_lock: self.conns = keep - if close: - with self.lock: - self.state = PoolState.CLOSED - # Clear the wait queue - with self._max_connecting_cond: - self._max_connecting_cond.notify_all() - with self.size_cond: - self.size_cond.notify_all() + if close: + with self.lock: + self.state = PoolState.CLOSED + # Clear the wait queue + with self._max_connecting_cond: + self._max_connecting_cond.notify_all() + with self.size_cond: + self.size_cond.notify_all() - if interrupt_connections: - for context in self.active_contexts.copy(): - context.cancel() + if interrupt_connections: + for context in self.active_contexts.copy(): + context.cancel() listeners = self.opts._event_listeners # CMAP spec says that close() MUST close sockets before publishing the