Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Rename 'find_all' to 'match'
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed May 9, 2016
1 parent f662c07 commit cde1377
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_from_top_decorators():
def test_from_top_utilities():
from yorm import create
from yorm import find
from yorm import find_all
from yorm import match
from yorm import load
from yorm import save
from yorm import delete
Expand Down
2 changes: 1 addition & 1 deletion yorm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from . import bases, types
from .common import UUID
from .decorators import sync, sync_object, sync_instances, attr
from .utilities import create, find, find_all, load, save, delete
from .utilities import create, find, match, load, save, delete
from .bases import Container, Converter, Mappable, Convertible
except ImportError: # pragma: no cover (manual test)
pass
4 changes: 2 additions & 2 deletions yorm/test/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def it_requires_a_mapped_class_or_instance():
utilities.find(Mock)


def describe_find_all():
def describe_match():

def it_is_not_yet_implemented():
with expect.raises(NotImplementedError):
utilities.find_all(Mock)
utilities.match(Mock)


def describe_load():
Expand Down
4 changes: 2 additions & 2 deletions yorm/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def find(class_or_instance, *args, create=False): # pylint: disable=redefined-o
return None


def find_all(cls, **kwargs):
"""Return a list of all matching mapped objects."""
def match(cls, **kwargs):
"""Yield all matching mapped objects."""
log.debug((cls, kwargs))
raise NotImplementedError

Expand Down

0 comments on commit cde1377

Please sign in to comment.