File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 2222
2323"""Information variable used by modules on this package."""
2424
25- __version__ = '1.0.1 '
25+ __version__ = '1.0.2 '
2626__author__ = 'Matteo Guadrini'
27272828__homepage__ = 'https://github.com/MatteoGuadrini/nosqlapi'
Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ def __len__(self):
103103 def __iter__ (self ):
104104 return (doc for doc in self .docs )
105105
106+ def __bool__ (self ):
107+ return True if self .docs else False
108+
106109
107110class Document :
108111
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ class Collection:
5454
5555 def __iter__ (self ) -> Iterator : ...
5656
57+ def __bool__ (self ) -> bool : ...
58+
5759
5860class Document :
5961 id : Union [str , Uuid ]
You can’t perform that action at this time.
0 commit comments