Skip to content

Commit c9ab72e

Browse files
committed
Fix indentation for copying and pasting in cells
1 parent 4f5531f commit c9ab72e

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

docs/50-aggregation/2-match-project.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ db.books.aggregate([
142142
</TabItem>
143143
<TabItem value="python" label="Python">
144144
<div>
145-
```python
146-
books_two_copies = books.aggregate([
145+
```python
146+
books_two_copies = books.aggregate([
147147
{ "$match": { "available": { "$gt": 2 } } }
148-
])
148+
])
149149

150-
for book in books_two_copies:
151-
print(book)
152-
```
150+
for book in books_two_copies:
151+
print(book)
152+
```
153153
</div>
154154
</TabItem>
155155
</Tabs>
@@ -205,15 +205,15 @@ db.books.aggregate([
205205
</TabItem>
206206
<TabItem value="python" label="Python">
207207
<div>
208-
```python
209-
books_two_copies = books.aggregate([
208+
```python
209+
books_two_copies = books.aggregate([
210210
{ "$match": { "available": { "$gt": 2 } } },
211211
{ "$project": { "title": 1, "year": 1, "_id": 0 } }
212-
])
212+
])
213213

214-
for book in books_two_copies:
215-
print(f"Title: {book['title']} - Publication Year: {book['year']}")
216-
```
214+
for book in books_two_copies:
215+
print(f"Title: {book['title']} - Publication Year: {book['year']}")
216+
```
217217
</div>
218218
</TabItem>
219219
</Tabs>

docs/50-aggregation/3-sort-limit.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ Learn [when to use $addFields over $project](https://www.practical-mongodb-aggre
192192
<Tabs groupId="aggregations-python" defaultValue="addFields">
193193
<TabItem value="project" label="Using $project">
194194
<div>
195-
```python
196-
most_authors = books.aggregate([
197-
{ "$match": { "year": { "$gt": 2000 } } },
195+
```python
196+
most_authors = books.aggregate([
197+
{ "$match": { "year": { "$gt": 2000 } } },
198198
{ "$match": { "authors": { "$exists": True } } },
199199
{
200200
"$project": {
@@ -208,17 +208,17 @@ Learn [when to use $addFields over $project](https://www.practical-mongodb-aggre
208208
{ "$limit": 1 }
209209
])
210210

211-
for book in most_authors:
212-
print(book)
211+
for book in most_authors:
212+
print(book)
213213
```
214214
</div>
215215
</TabItem>
216216

217217
<TabItem value="addFields" label="Using $addFields">
218218
<div>
219-
```python
220-
most_authors = books.aggregate([
221-
{ "$match": { "year": { "$gt": 2000 } } },
219+
```python
220+
most_authors = books.aggregate([
221+
{ "$match": { "year": { "$gt": 2000 } } },
222222
{ "$match": { "authors": { "$exists": True } } },
223223
{
224224
"$addFields": {
@@ -229,8 +229,8 @@ Learn [when to use $addFields over $project](https://www.practical-mongodb-aggre
229229
{ "$limit": 1 }
230230
])
231231

232-
for book in most_authors:
233-
print(book)
232+
for book in most_authors:
233+
print(book)
234234
```
235235
</div>
236236
</TabItem>

docs/50-aggregation/4-group.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ GROUP BY year;
186186
}
187187
])
188188

189-
for book in books_with_avg_rating:
190-
print(book)
189+
for book in books_with_avg_rating:
190+
print(book)
191191
```
192192
</div>
193193
</TabItem>
@@ -300,8 +300,8 @@ GROUP BY year;
300300
}
301301
])
302302

303-
for reviewer in reviewers_count:
304-
print(reviewer)
303+
for reviewer in reviewers_count:
304+
print(reviewer)
305305
```
306306
</div>
307307
</TabItem>
@@ -315,8 +315,8 @@ GROUP BY year;
315315
}
316316
])
317317

318-
for reviewer in reviewers_count:
319-
print(reviewer)
318+
for reviewer in reviewers_count:
319+
print(reviewer)
320320
```
321321
</div>
322322
</TabItem>

docs/50-aggregation/7-merge.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ ON DUPLICATE KEY UPDATE totalBooks = VALUES(totalBooks);
211211
<TabItem value="authors" label="through authors collection">
212212
```python
213213
authors_collection = db.authors
214-
author_stats = authors_collection.aggregate([
214+
author_stats = authors_collection.aggregate([
215215
{ "$unwind": "$books" },
216216
{ "$group": { "_id": "$name", "totalBooks": { "$sum": 1 } } },
217217
{ "$merge": {

0 commit comments

Comments
 (0)