-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1378 from crytic/dev-fix-usingfor
Improve support using for directive
- Loading branch information
Showing
40 changed files
with
816 additions
and
29 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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import TYPE_CHECKING, List, Dict, Union | ||
|
||
from slither.core.solidity_types.type import Type | ||
from slither.core.declarations.top_level import TopLevel | ||
|
||
if TYPE_CHECKING: | ||
from slither.core.scope.scope import FileScope | ||
|
||
|
||
class UsingForTopLevel(TopLevel): | ||
def __init__(self, scope: "FileScope"): | ||
super().__init__() | ||
self._using_for: Dict[Union[str, Type], List[Type]] = {} | ||
self.file_scope: "FileScope" = scope | ||
|
||
@property | ||
def using_for(self) -> Dict[Type, List[Type]]: | ||
return self._using_for |
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.