Tests whether an object should be omitted from the dependency graph.
(obj, blacklist)
| 691 | def _find_reference_cycle(objects, idx): |
| 692 | |
| 693 | def get_ignore_reason(obj, blacklist): |
| 694 | """Tests whether an object should be omitted from the dependency graph.""" |
| 695 | if len(blacklist) > 100: |
| 696 | return "<depth limit>" |
| 697 | if tf_inspect.isframe(obj): |
| 698 | if "test_util.py" in tf_inspect.getframeinfo(obj)[0]: |
| 699 | return "<test code>" |
| 700 | for b in blacklist: |
| 701 | if b is obj: |
| 702 | return "<test code>" |
| 703 | if obj is blacklist: |
| 704 | return "<test code>" |
| 705 | return None |
| 706 | |
| 707 | # Note: this function is meant to help with diagnostics. Its output is purely |
| 708 | # a human-readable representation, so you may freely modify it to suit your |
no outgoing calls
no test coverage detected