Return whether or not a dotted class path (or a subclass of that class) is found in a list of candidate paths.
(class_path, candidate_paths)
| 28 | |
| 29 | |
| 30 | def _contains_subclass(class_path, candidate_paths): |
| 31 | """ |
| 32 | Return whether or not a dotted class path (or a subclass of that class) is |
| 33 | found in a list of candidate paths. |
| 34 | """ |
| 35 | cls = import_string(class_path) |
| 36 | for path in candidate_paths: |
| 37 | try: |
| 38 | candidate_cls = import_string(path) |
| 39 | except ImportError: |
| 40 | # ImportErrors are raised elsewhere. |
| 41 | continue |
| 42 | if _issubclass(candidate_cls, cls): |
| 43 | return True |
| 44 | return False |
| 45 | |
| 46 | |
| 47 | def check_admin_app(app_configs, **kwargs): |
no test coverage detected