@@ -220,34 +220,31 @@ cdef class IndexEngine:
220220 def __sizeof__ (self ):
221221 return self .sizeof()
222222
223- property is_unique :
223+ @property
224+ def is_unique (self ):
225+ if self .need_unique_check:
226+ self ._do_unique_check()
224227
225- def __get__ (self ):
226- if self .need_unique_check:
227- self ._do_unique_check()
228-
229- return self .unique == 1
228+ return self .unique == 1
230229
231230 cdef inline _do_unique_check(self ):
232231
233232 # this de-facto the same
234233 self ._ensure_mapping_populated()
235234
236- property is_monotonic_increasing :
237-
238- def __get__ (self ):
239- if self .need_monotonic_check:
240- self ._do_monotonic_check()
235+ @property
236+ def is_monotonic_increasing (self ):
237+ if self .need_monotonic_check:
238+ self ._do_monotonic_check()
241239
242- return self .monotonic_inc == 1
240+ return self .monotonic_inc == 1
243241
244- property is_monotonic_decreasing :
242+ @property
243+ def is_monotonic_decreasing (self ):
244+ if self .need_monotonic_check:
245+ self ._do_monotonic_check()
245246
246- def __get__ (self ):
247- if self .need_monotonic_check:
248- self ._do_monotonic_check()
249-
250- return self .monotonic_dec == 1
247+ return self .monotonic_dec == 1
251248
252249 cdef inline _do_monotonic_check(self ):
253250 cdef object is_unique
@@ -279,10 +276,9 @@ cdef class IndexEngine:
279276 cdef _check_type(self , object val):
280277 hash (val)
281278
282- property is_mapping_populated :
283-
284- def __get__ (self ):
285- return self .mapping is not None
279+ @property
280+ def is_mapping_populated (self ):
281+ return self .mapping is not None
286282
287283 cdef inline _ensure_mapping_populated(self ):
288284 # this populates the mapping
0 commit comments