Check whether an object is non-degenerate rect-like. It must be a sequence of 4 numbers.
(r: typing.Any)
| 22092 | |
| 22093 | |
| 22094 | def CheckRect(r: typing.Any) -> bool: |
| 22095 | """Check whether an object is non-degenerate rect-like. |
| 22096 | |
| 22097 | It must be a sequence of 4 numbers. |
| 22098 | """ |
| 22099 | try: |
| 22100 | r = Rect(r) |
| 22101 | except Exception: |
| 22102 | if g_exceptions_verbose > 1: exception_info() |
| 22103 | return False |
| 22104 | return not (r.is_empty or r.is_infinite) |
| 22105 | |
| 22106 | |
| 22107 | def ColorCode(c: typing.Union[list, tuple, float, None], f: str) -> str: |
no test coverage detected
searching dependent graphs…