(data: ReadBuffer, stmt: Import | ImportFrom | ImportAll)
| 2016 | |
| 2017 | |
| 2018 | def _read_and_set_import_metadata(data: ReadBuffer, stmt: Import | ImportFrom | ImportAll) -> None: |
| 2019 | read_loc(data, stmt) |
| 2020 | |
| 2021 | # Metadata flags as a single integer bitfield |
| 2022 | flags = read_int(data) |
| 2023 | |
| 2024 | # Extract individual flags using bitwise operations |
| 2025 | # Bit 0: is_top_level |
| 2026 | # Bit 1: is_unreachable |
| 2027 | # Bit 2: is_mypy_only |
| 2028 | stmt.is_top_level = (flags & 0x01) != 0 |
| 2029 | stmt.is_unreachable = (flags & 0x02) != 0 |
| 2030 | stmt.is_mypy_only = (flags & 0x04) != 0 |
no test coverage detected
searching dependent graphs…