mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
Fix broken __future__ import in IDA plugin custom_script
The first line reads `from future import __annotations__`, with the module name and the imported symbol swapped. The intent was clearly the PEP 563 future statement `from __future__ import annotations`. As written, the line fails in both possible situations: - without the third-party `future` package installed (the common case), the import raises `ModuleNotFoundError`, so `QILING_IDA` is never defined; - with that package installed, the import silently succeeds but binds the module's empty `__annotations__` dict, so PEP 563 is *not* enabled — while the annotations in this file (`ql: Qiling`) rely on it, `Qiling` being imported under `TYPE_CHECKING` only. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pru9dwqPVrDakERYZwzjUx
This commit is contained in:
co-authored by
Claude Opus 5
parent
499218bd1a
commit
dbf1cab94a
@@ -1,4 +1,4 @@
|
||||
from future import __annotations__
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, List
|
||||
|
||||
|
||||
Reference in New Issue
Block a user