Skip to content

Commit 7fcfb6e

Browse files
committed
IS_SYNC -> _IS_SYNC
1 parent 77a4328 commit 7fcfb6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+119
-119
lines changed

gridfs/asynchronous/grid_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
OperationFailure,
5959
)
6060

61-
IS_SYNC = False
61+
_IS_SYNC = False
6262

6363

6464
def _disallow_transactions(session: Optional[ClientSession]) -> None:
@@ -1172,7 +1172,7 @@ def __getattr__(self, name: str) -> Any:
11721172
raise AttributeError("GridIn object has no attribute '%s'" % name)
11731173

11741174
def __setattr__(self, name: str, value: Any) -> None:
1175-
if IS_SYNC:
1175+
if _IS_SYNC:
11761176
# For properties of this instance like _buffer, or descriptors set on
11771177
# the class like filename, use regular __setattr__
11781178
if name in self.__dict__ or name in self.__class__.__dict__:
@@ -1490,7 +1490,7 @@ async def open(self) -> None:
14901490
)
14911491

14921492
def __getattr__(self, name: str) -> Any:
1493-
if IS_SYNC:
1493+
if _IS_SYNC:
14941494
self.open() # type: ignore[unused-coroutine]
14951495
elif not self._file:
14961496
raise InvalidOperation(

gridfs/synchronous/grid_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
from pymongo.synchronous.helpers import _check_write_command_response, next
5959
from pymongo.synchronous.read_preferences import ReadPreference, _ServerMode
6060

61-
IS_SYNC = True
61+
_IS_SYNC = True
6262

6363

6464
def _disallow_transactions(session: Optional[ClientSession]) -> None:
@@ -1162,7 +1162,7 @@ def __getattr__(self, name: str) -> Any:
11621162
raise AttributeError("GridIn object has no attribute '%s'" % name)
11631163

11641164
def __setattr__(self, name: str, value: Any) -> None:
1165-
if IS_SYNC:
1165+
if _IS_SYNC:
11661166
# For properties of this instance like _buffer, or descriptors set on
11671167
# the class like filename, use regular __setattr__
11681168
if name in self.__dict__ or name in self.__class__.__dict__:
@@ -1478,7 +1478,7 @@ def open(self) -> None:
14781478
)
14791479

14801480
def __getattr__(self, name: str) -> Any:
1481-
if IS_SYNC:
1481+
if _IS_SYNC:
14821482
self.open() # type: ignore[unused-coroutine]
14831483
elif not self._file:
14841484
raise InvalidOperation(

pymongo/asynchronous/aggregation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from pymongo.asynchronous.server import Server
3434
from pymongo.asynchronous.typings import _DocumentType, _Pipeline
3535

36-
IS_SYNC = False
36+
_IS_SYNC = False
3737

3838

3939
class _AggregationCommand:

pymongo/asynchronous/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
HAVE_KERBEROS = False
6868

6969

70-
IS_SYNC = False
70+
_IS_SYNC = False
7171

7272
MECHANISMS = frozenset(
7373
[

pymongo/asynchronous/auth_aws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from pymongo.asynchronous.auth import MongoCredential
2727
from pymongo.asynchronous.pool import Connection
2828

29-
IS_SYNC = False
29+
_IS_SYNC = False
3030

3131

3232
async def _authenticate_aws(credentials: MongoCredential, conn: Connection) -> None:

pymongo/asynchronous/auth_oidc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from pymongo.asynchronous.auth import MongoCredential
3636
from pymongo.asynchronous.pool import Connection
3737

38-
IS_SYNC = False
38+
_IS_SYNC = False
3939

4040

4141
@dataclass

pymongo/asynchronous/bulk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
from pymongo.asynchronous.pool import Connection
6767
from pymongo.asynchronous.typings import _DocumentOut, _DocumentType, _Pipeline
6868

69-
IS_SYNC = False
69+
_IS_SYNC = False
7070

7171
_DELETE_ALL: int = 0
7272
_DELETE_ONE: int = 1

pymongo/asynchronous/change_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
PyMongoError,
4141
)
4242

43-
IS_SYNC = False
43+
_IS_SYNC = False
4444

4545
# The change streams spec considers the following server errors from the
4646
# getMore command non-resumable. All other getMore errors are resumable.

pymongo/asynchronous/client_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from pymongo.asynchronous.topology_description import _ServerSelector
4141
from pymongo.pyopenssl_context import SSLContext
4242

43-
IS_SYNC = False
43+
_IS_SYNC = False
4444

4545

4646
def _parse_credentials(

pymongo/asynchronous/client_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
from pymongo.asynchronous.server import Server
180180
from pymongo.asynchronous.typings import ClusterTime, _Address
181181

182-
IS_SYNC = False
182+
_IS_SYNC = False
183183

184184

185185
class SessionOptions:

0 commit comments

Comments
 (0)