Skip to content

Commit

Permalink
Remove starred expression
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlatwe committed Jun 24, 2018
1 parent 68bb19d commit 5c051e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion montydb/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, database, name, create=False,

self._database = database
self._name = name
self._components = (database,)
self._components = (database, self)

def __repr__(self):
return "MontyCollection({!r}, {!r})".format(self._database, self._name)
Expand Down
2 changes: 1 addition & 1 deletion montydb/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self,

self._address = collection.database.client.address
self._collection = collection
self._components = (collection.database, collection)
self._components = (collection.database, collection, self)
self._codec_options = collection.codec_options

self._spec = _bson_touch(spec, self._codec_options)
Expand Down
2 changes: 1 addition & 1 deletion montydb/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, client, name, codec_options=None, write_concern=None):

self._client = client
self._name = name
self._components = ()
self._components = (self,)

def __eq__(self, other):
if isinstance(other, self.__class__):
Expand Down
2 changes: 1 addition & 1 deletion montydb/storage/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def obj_attr(attr_):
def __getattr__(self, attr):
def delegate(subject, *args, **kwargs):
delegator = self
for inst in (*subject._components, subject):
for inst in subject._components:
delegator = delegator.contractor_cls(delegator, inst)
return getattr(delegator, attr)(*args, **kwargs)
return delegate
Expand Down

0 comments on commit 5c051e5

Please sign in to comment.