Skip to content

Commit 0abb97a

Browse files
Michael Kryukovmichaelkryukov
Michael Kryukov
authored andcommitted
refactor: removed unused method
1 parent 09bb06c commit 0abb97a

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

mongomock_motor/patches.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,28 +122,6 @@ def wrapper(spec, sort, fields, as_class):
122122
return collection
123123

124124

125-
def _patch_get_dataset(collection):
126-
"""
127-
When using beanie, keys can have "ExpressionField" type,
128-
that is inherited from "str". Looks like pymongo works ok
129-
with that, so we should be too.
130-
"""
131-
132-
def with_normalized_strings_in_filter(fn):
133-
@wraps(fn)
134-
def wrapper(spec, sort, fields, as_class):
135-
print(sort)
136-
return fn(spec, _normalize_strings(sort), fields, as_class)
137-
138-
return wrapper
139-
140-
collection._get_dataset = with_normalized_strings_in_filter(
141-
collection._get_dataset,
142-
)
143-
144-
return collection
145-
146-
147125
def _patch_collection_internals(collection):
148126
if getattr(collection, '_patched_by_mongomock_motor', False):
149127
return collection

0 commit comments

Comments
 (0)