(ignored)
| 352 | |
| 353 | |
| 354 | def _resolve_ignored(ignored): |
| 355 | if isinstance(ignored, str): |
| 356 | ignored = [ignored] |
| 357 | for raw in ignored: |
| 358 | if isinstance(raw, str): |
| 359 | if raw.startswith('|'): |
| 360 | yield raw[1:] |
| 361 | elif raw.startswith('<') and raw.endswith('>'): |
| 362 | filename = raw[1:-1] |
| 363 | try: |
| 364 | infile = open(filename) |
| 365 | except Exception as exc: |
| 366 | logger.error(f'ignore file failed: {exc}') |
| 367 | continue |
| 368 | logger.log(1, f'reading ignored names from {filename!r}') |
| 369 | with infile: |
| 370 | for line in infile: |
| 371 | if not line: |
| 372 | continue |
| 373 | if line[0].isspace(): |
| 374 | continue |
| 375 | line = line.partition('#')[0].rstrip() |
| 376 | if line: |
| 377 | # XXX Recurse? |
| 378 | yield line |
| 379 | else: |
| 380 | raw = raw.strip() |
| 381 | if raw: |
| 382 | yield raw |
| 383 | else: |
| 384 | raise NotImplementedError |
| 385 | |
| 386 | |
| 387 | def _collate(items, groupby, includeempty): |
no test coverage detected
searching dependent graphs…