Skip to content

Commit e9fb543

Browse files
sirosenkurtmckee
andcommitted
Apply suggestions from code review
Co-authored-by: Kurt McKee <[email protected]>
1 parent 8ae5c9c commit e9fb543

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

docs/authorization/globus_app/apps.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ For example,
110110
# after the context manager, any storage is implicitly closed
111111
112112
113-
However, when token storages are created explicitly, they are not automatically
114-
closed, and the user becomes responsible for closing them. For example,
113+
However, when token storage instances are created by the user, they are not automatically
114+
closed, and the user is responsible for closing them. For example,
115115
in the following usage, the user must close the token storage:
116116

117117
.. code-block:: python
118118
119119
from globus_sdk import GlobusAppConfig, UserApp
120120
from globus_sdk.token_storage import SQLiteTokenStorage
121121
122-
# this manually created storage will not be automatically closed
122+
# this token storage is created by the user and will not be closed automatically
123123
sql_storage = SQLiteTokenStorage("tokens.sqlite")
124124
125125
# create an app configured to use this storage
@@ -131,8 +131,8 @@ in the following usage, the user must close the token storage:
131131
with UserApp("a-different-app", client_id="OTHER_ID", config=config) as app:
132132
do_stuff(app)
133133
134-
# at this stage, the storage will still not be closed
135-
# it should be explicitly closed
134+
# At this stage, the storage will still be open.
135+
# It should be explicitly closed:
136136
sql_storage.close()
137137
138138

docs/core/base_client.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ For example, in the following usage, the user must close the transport:
4949
with SearchClient(app=app, transport=my_transport) as client:
5050
... # any usage
5151
52-
# at this stage, the transport will not be closed
53-
# it should be explicitly closed
52+
# At this stage, the transport will still be open.
53+
# It should be explicitly closed:
5454
my_transport.close()
5555
5656

docs/user_guide/getting_started/minimal_script.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ One of them is exactly the same as the tutorial steps above, in a single block.
9999
The next is a version of the tutorial which leverages the context manager
100100
interfaces of the app and client to do cleanup.
101101
This is slightly more verbose, but such usage is recommended because it ensures
102-
resources associated with the client and app are properly closed.
102+
that network and filesystem resources associated with the client and app are
103+
properly closed.
103104

104105
The final example includes an explicit login step, so you can control when that
105106
login flow happens!
@@ -117,7 +118,7 @@ Like the previous example, it uses the context manager style to ensure proper cl
117118

118119
.. tab-item:: With Context Managers
119120

120-
This example is the same as the tutorial, but does safer resource cleanup.
121+
This example is the same as the tutorial, but safely cleans up resources.
121122

122123
.. literalinclude:: list_groups_improved.py
123124
:caption: ``list_groups_improved.py`` [:download:`download <list_groups_improved.py>`]

0 commit comments

Comments
 (0)