Skip to content

Commit 01a1941

Browse files
committed
Reduce imports clutter
1 parent 964fc35 commit 01a1941

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

qiling/const.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,8 @@ def __casefold_enum(e: Type[T]) -> Mapping[str, T]:
8282
QL_ARCH.EVM : QL_OS.EVM,
8383
QL_ARCH.CORTEX_M : QL_OS.MCU
8484
}
85+
86+
__all__ = [
87+
'QL_ENDIAN', 'QL_ARCH', 'QL_OS', 'QL_VERBOSE', 'QL_DEBUGGER', 'QL_INTERCEPT', 'QL_STOP',
88+
'QL_ARCH_INTERPRETER', 'QL_OS_POSIX', 'QL_OS_BAREMETAL', 'QL_HOOK_BLOCK', 'QL_CALL_BLOCK'
89+
]

qiling/os/memory.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
#
55

66
import os, re
7-
from typing import Any, Callable, List, MutableSequence, Optional, Sequence, Tuple
7+
from typing import Any, Callable, List, Mapping, MutableSequence, Optional, Sequence, Tuple
88

99
from unicorn import UC_PROT_NONE, UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC, UC_PROT_ALL
1010

1111
from qiling import Qiling
12-
from qiling.const import *
1312
from qiling.exception import *
1413

1514
# tuple: range start, range end, permissions mask, range label, is mmio?

qiling/os/posix/const_mapping.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
44
#
55

6-
from typing import MutableSequence
7-
from .const import *
6+
from typing import Mapping, MutableSequence
87

98
from qiling import Qiling
10-
from qiling.const import *
9+
from qiling.const import QL_ARCH, QL_OS
10+
11+
from .const import *
1112

1213
def _invert_dict(d: Mapping) -> Mapping:
1314
return { v:k for k, v in d.items()}

0 commit comments

Comments
 (0)