generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
153 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
from ape import plugins | ||
from typing import Any | ||
|
||
from ._utils import FileType | ||
from .compiler import VyperCompiler | ||
from .config import VyperConfig | ||
from ape import plugins | ||
|
||
|
||
@plugins.register(plugins.Config) | ||
def config_class(): | ||
from .config import VyperConfig | ||
|
||
return VyperConfig | ||
|
||
|
||
@plugins.register(plugins.CompilerPlugin) | ||
def register_compiler(): | ||
from ._utils import FileType | ||
from .compiler import VyperCompiler | ||
|
||
return tuple(e.value for e in FileType), VyperCompiler | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
if name == "FileType": | ||
from ._utils import FileType | ||
|
||
return FileType | ||
|
||
elif name == "VyperCompiler": | ||
from .compiler import VyperCompiler | ||
|
||
return VyperCompiler | ||
|
||
elif name == "VyperConfig": | ||
from .config import VyperConfig | ||
|
||
return VyperConfig | ||
|
||
else: | ||
raise AttributeError(name) | ||
|
||
|
||
__all__ = [ | ||
"FileType", | ||
"VyperCompiler", | ||
"VyperConfig", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.