Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstring #766

Merged
merged 2 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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