Skip to content

Commit 6dcf5b7

Browse files
Format code with black, yapf, autopep8, isort, standardjs and prettier
1 parent 7635d0c commit 6dcf5b7

File tree

5 files changed

+315
-319
lines changed

5 files changed

+315
-319
lines changed

mongodb/test.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
from pymongo import *
21
from bson.binary import Binary
2+
from pymongo import *
33

44
cluster = MongoClient(
55
"mongodb+srv://Ranuga:[email protected]/<dbname>?retryWrites=true&w=majority"
66
)
77
db = cluster["test"]
88
collectin = db["test"]
9-
with open(f"/home/ranuga/Programming/Projects/Python/Flask/Done/My-Class-Room-V2/mongodb/get_the_last_id.py", "rb") as f:
9+
with open(
10+
f"/home/ranuga/Programming/Projects/Python/Flask/Done/My-Class-Room-V2/mongodb/get_the_last_id.py",
11+
"rb",
12+
) as f:
1013
encoded = Binary(f.read())
11-
collectin.insert_one({'test':encoded,'file':'get_the_last_id.py'})
14+
collectin.insert_one({"test": encoded, "file": "get_the_last_id.py"})
1215
results = []
13-
for result in collectin.find({'file':'get_the_last_id.py'}):
16+
for result in collectin.find({"file": "get_the_last_id.py"}):
1417
results.append(result)
15-
with open('test.py','wb') as a:
16-
a.write(results[0]['test'])
17-
18+
with open("test.py", "wb") as a:
19+
a.write(results[0]["test"])

0 commit comments

Comments
 (0)