An include like: #include "pycore_long.h" // _Py_ID()
| 74 | |
| 75 | @dc.dataclass(slots=True, frozen=True) |
| 76 | class Include: |
| 77 | """ |
| 78 | An include like: #include "pycore_long.h" // _Py_ID() |
| 79 | """ |
| 80 | # Example: "pycore_long.h". |
| 81 | filename: str |
| 82 | |
| 83 | # Example: "_Py_ID()". |
| 84 | reason: str |
| 85 | |
| 86 | # None means unconditional include. |
| 87 | # Example: "#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)". |
| 88 | condition: str | None |
| 89 | |
| 90 | def sort_key(self) -> tuple[str, str]: |
| 91 | # order: '#if' comes before 'NO_CONDITION' |
| 92 | return (self.condition or 'NO_CONDITION', self.filename) |
| 93 | |
| 94 | |
| 95 | @dc.dataclass(slots=True) |
no outgoing calls
no test coverage detected
searching dependent graphs…