From e1ec612d4b5dc8298b95cacbb08488a71226b3c9 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Tue, 7 Dec 2021 14:41:03 -0600 Subject: [PATCH] feat: allow CompilerAPI to be imported from root ape.api namespace (#288) --- src/ape/api/__init__.py | 2 ++ src/ape/api/compiler.py | 2 +- src/ape/managers/compilers.py | 2 +- src/ape/plugins/compiler.py | 2 +- src/ape_pm/compiler.py | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ape/api/__init__.py b/src/ape/api/__init__.py index 753b090caa..ae284ee3f1 100644 --- a/src/ape/api/__init__.py +++ b/src/ape/api/__init__.py @@ -1,5 +1,6 @@ from .accounts import AccountAPI, AccountContainerAPI, TestAccountAPI, TestAccountContainerAPI from .address import Address, AddressAPI +from .compiler import CompilerAPI from .config import ConfigDict, ConfigEnum, ConfigItem from .contracts import ContractInstance, ContractLog from .convert import ConverterAPI @@ -27,6 +28,7 @@ "BlockAPI", "BlockConsensusAPI", "BlockGasAPI", + "CompilerAPI", "ConfigDict", "ConfigEnum", "ConfigItem", diff --git a/src/ape/api/compiler.py b/src/ape/api/compiler.py index c4ac443366..fc447937f6 100644 --- a/src/ape/api/compiler.py +++ b/src/ape/api/compiler.py @@ -1,10 +1,10 @@ from pathlib import Path from typing import List, Set -from ape.api import ConfigItem from ape.types import ContractType from .base import abstractdataclass, abstractmethod +from .config import ConfigItem @abstractdataclass diff --git a/src/ape/managers/compilers.py b/src/ape/managers/compilers.py index f7bea529ea..fa9d07de72 100644 --- a/src/ape/managers/compilers.py +++ b/src/ape/managers/compilers.py @@ -3,7 +3,7 @@ from dataclassy import dataclass -from ape.api.compiler import CompilerAPI +from ape.api import CompilerAPI from ape.exceptions import CompilerError from ape.logging import logger from ape.plugins import PluginManager diff --git a/src/ape/plugins/compiler.py b/src/ape/plugins/compiler.py index 6e464de2d8..000e7ca506 100644 --- a/src/ape/plugins/compiler.py +++ b/src/ape/plugins/compiler.py @@ -1,6 +1,6 @@ from typing import Tuple, Type -from ape.api.compiler import CompilerAPI +from ape.api import CompilerAPI from .pluggy_patch import PluginType, hookspec diff --git a/src/ape_pm/compiler.py b/src/ape_pm/compiler.py index c05df833ab..ec9204aa14 100644 --- a/src/ape_pm/compiler.py +++ b/src/ape_pm/compiler.py @@ -2,7 +2,7 @@ from pathlib import Path from typing import List, Set -from ape.api.compiler import CompilerAPI +from ape.api import CompilerAPI from ape.exceptions import CompilerError from ape.types import ContractType