Skip to content
/ ape Public
forked from ApeWorX/ape

Commit e1ec612

Browse files
authored
feat: allow CompilerAPI to be imported from root ape.api namespace (#288)
1 parent 898fc8d commit e1ec612

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

src/ape/api/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .accounts import AccountAPI, AccountContainerAPI, TestAccountAPI, TestAccountContainerAPI
22
from .address import Address, AddressAPI
3+
from .compiler import CompilerAPI
34
from .config import ConfigDict, ConfigEnum, ConfigItem
45
from .contracts import ContractInstance, ContractLog
56
from .convert import ConverterAPI
@@ -27,6 +28,7 @@
2728
"BlockAPI",
2829
"BlockConsensusAPI",
2930
"BlockGasAPI",
31+
"CompilerAPI",
3032
"ConfigDict",
3133
"ConfigEnum",
3234
"ConfigItem",

src/ape/api/compiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from pathlib import Path
22
from typing import List, Set
33

4-
from ape.api import ConfigItem
54
from ape.types import ContractType
65

76
from .base import abstractdataclass, abstractmethod
7+
from .config import ConfigItem
88

99

1010
@abstractdataclass

src/ape/managers/compilers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from dataclassy import dataclass
55

6-
from ape.api.compiler import CompilerAPI
6+
from ape.api import CompilerAPI
77
from ape.exceptions import CompilerError
88
from ape.logging import logger
99
from ape.plugins import PluginManager

src/ape/plugins/compiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Tuple, Type
22

3-
from ape.api.compiler import CompilerAPI
3+
from ape.api import CompilerAPI
44

55
from .pluggy_patch import PluginType, hookspec
66

src/ape_pm/compiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
from typing import List, Set
44

5-
from ape.api.compiler import CompilerAPI
5+
from ape.api import CompilerAPI
66
from ape.exceptions import CompilerError
77
from ape.types import ContractType
88

0 commit comments

Comments
 (0)