| 456 | |
| 457 | |
| 458 | def classify(module: str, name: str, shadow: str | None) -> tuple[str, str, str]: |
| 459 | if shadow is not None: |
| 460 | return ( |
| 461 | "runtime-attribution-required", |
| 462 | shadow, |
| 463 | "bare builtin spelling is shadowed in lexical scope", |
| 464 | ) |
| 465 | if module == "builtins": |
| 466 | supported = SUPPORTED_BUILTINS.get(name) |
| 467 | if supported: |
| 468 | return supported |
| 469 | boundary, note = UNSUPPORTED_BUILTINS.get( |
| 470 | name, |
| 471 | ("unknown-builtin-boundary", "observed builtin not classified by this audit"), |
| 472 | ) |
| 473 | return "unsupported", boundary, note |
| 474 | boundary, note = MODULE_METHOD_BOUNDARIES.get( |
| 475 | (module, name), |
| 476 | ("unknown-module-boundary", "observed module function not classified by this audit"), |
| 477 | ) |
| 478 | return "unsupported", boundary, note |
| 479 | |
| 480 | |
| 481 | def next_work_group( |