Skip to content

Commit ed8fa37

Browse files
DenisaCGafshin
andauthored
Update docstrings and variable names
Co-authored-by: Afshin Taylor Darian <[email protected]>
1 parent dfafbf5 commit ed8fa37

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

jupyter_drives/manager.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ async def new_file(self, drive_name, path):
247247
Args:
248248
drive_name: name of drive where the new content is created
249249
path: path where new content should be created
250-
content: content of object
251250
"""
252251
data = {}
253252
try:
@@ -289,8 +288,8 @@ async def save_file(self, drive_name, path, content, options_format, content_for
289288
path = path.strip('/')
290289

291290
if options_format == 'json':
292-
formattedContent = json.dumps(content, indent=2)
293-
formattedContent = formattedContent.encode("utf-8")
291+
formatted_content = json.dumps(content, indent=2)
292+
formatted_content = formatted_content.encode("utf-8")
294293
elif options_format == 'base64' and (content_format == 'base64' or content_type == 'PDF'):
295294
# transform base64 encoding to a UTF-8 byte array for saving or storing
296295
byte_characters = base64.b64decode(content)
@@ -302,14 +301,14 @@ async def save_file(self, drive_name, path, content, options_format, content_for
302301
byte_arrays.append(byte_array)
303302

304303
# combine byte arrays and wrap in a BytesIO object
305-
formattedContent = BytesIO(b"".join(byte_arrays))
306-
formattedContent.seek(0) # reset cursor for any further reading
304+
formatted_content = BytesIO(b"".join(byte_arrays))
305+
formatted_content.seek(0) # reset cursor for any further reading
307306
elif options_format == 'text':
308-
formattedContent = content.encode("utf-8")
307+
formatted_content = content.encode("utf-8")
309308
else:
310-
formattedContent = content
309+
formatted_content = content
311310

312-
await obs.put_async(self._content_managers[drive_name], path, formattedContent, mode = "overwrite")
311+
await obs.put_async(self._content_managers[drive_name], path, formatted_content, mode = "overwrite")
313312
metadata = await obs.head_async(self._content_managers[drive_name], path)
314313

315314
data = {
@@ -335,6 +334,7 @@ async def rename_file(self, drive_name, path, new_path):
335334
Args:
336335
drive_name: name of drive where file is located
337336
path: path of file
337+
new_path: path of new file name
338338
"""
339339
data = {}
340340
try:

0 commit comments

Comments
 (0)