MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / __or__

Method __or__

src/__init__.py:14629–14637  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

14627 return not (max(self) == min(self) == 0)
14628
14629 def __or__(self, x):
14630 if not hasattr(x, "__len__"):
14631 raise ValueError("bad operand 2")
14632 r = Rect(self)
14633 if len(x) == 2:
14634 return r.include_point(x)
14635 if len(x) == 4:
14636 return r.include_rect(x)
14637 raise ValueError("bad operand 2")
14638
14639 def __pos__(self):
14640 return Rect(self)

Callers 1

__or__Method · 0.45

Calls 3

include_pointMethod · 0.95
include_rectMethod · 0.95
RectClass · 0.85

Tested by

no test coverage detected