True for node labels that represent an importable definition (so a symbol-name * fallback does not link to, e.g., a Variable or Field). */
| 1558 | /* True for node labels that represent an importable definition (so a symbol-name |
| 1559 | * fallback does not link to, e.g., a Variable or Field). */ |
| 1560 | static bool import_targetable_label(const char *label) { |
| 1561 | if (!label) { |
| 1562 | return false; |
| 1563 | } |
| 1564 | static const char *ok[] = {"Class", "Interface", "Function", "Method", "Module", "Struct", |
| 1565 | "Enum", "Trait", "Type", "File", NULL}; |
| 1566 | for (const char **l = ok; *l; l++) { |
| 1567 | if (strcmp(*l, label) == 0) { |
| 1568 | return true; |
| 1569 | } |
| 1570 | } |
| 1571 | return false; |
| 1572 | } |
| 1573 | |
| 1574 | /* #2127: a Python import path spells the module chain that owns the imported |
| 1575 | * name (`from unittest.mock import patch` -> unittest, mock). Strategy 3 matches |
no outgoing calls
no test coverage detected