Skip to content

Commit

Permalink
Fix docstring (#766)
Browse files Browse the repository at this point in the history
* fix docstring for update operator

* fix docstring for array operator
  • Loading branch information
Derfirm authored Nov 5, 2023
1 parent 0add350 commit 12f4a14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions beanie/odm/operators/update/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AddToSet(BaseUpdateArrayOperator):
class Sample(Document):
results: List[int]
AddToSet({Sample.results, 2})
AddToSet({Sample.results: 2})
```
Will return query object like
Expand All @@ -48,7 +48,7 @@ class Pop(BaseUpdateArrayOperator):
class Sample(Document):
results: List[int]
Pop({Sample.results, 2})
Pop({Sample.results: 2})
```
Will return query object like
Expand All @@ -74,7 +74,7 @@ class Pull(BaseUpdateArrayOperator):
class Sample(Document):
results: List[int]
Pull(In(Sample.result, [1,2,3,4,5])
Pull(In(Sample.result: [1,2,3,4,5])
```
Will return query object like
Expand Down
10 changes: 5 additions & 5 deletions beanie/odm/operators/update/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CurrentDate(BaseUpdateGeneralOperator):
class Sample(Document):
ts: datetime
CurrentDate({Sample.ts, True})
CurrentDate({Sample.ts: True})
```
Will return query object like
Expand All @@ -107,7 +107,7 @@ class Inc(BaseUpdateGeneralOperator):
class Sample(Document):
one: int
Inc({Sample.one, 2})
Inc({Sample.one: 2})
```
Will return query object like
Expand All @@ -133,7 +133,7 @@ class Min(BaseUpdateGeneralOperator):
class Sample(Document):
one: int
Min({Sample.one, 2})
Min({Sample.one: 2})
```
Will return query object like
Expand All @@ -159,7 +159,7 @@ class Max(BaseUpdateGeneralOperator):
class Sample(Document):
one: int
Max({Sample.one, 2})
Max({Sample.one: 2})
```
Will return query object like
Expand All @@ -185,7 +185,7 @@ class Mul(BaseUpdateGeneralOperator):
class Sample(Document):
one: int
Mul({Sample.one, 2})
Mul({Sample.one: 2})
```
Will return query object like
Expand Down

0 comments on commit 12f4a14

Please sign in to comment.