-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
importlib.import_module also needs to handle string types (#389)
The importlib.import_module module and function also needs to correctly handle the new format for "true" strings in an argument value. It needs to use value_str instead of value. Signed-off-by: Eric Brown <[email protected]>
- Loading branch information
Showing
3 changed files
with
13 additions
and
2 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
10 changes: 10 additions & 0 deletions
10
tests/unit/rules/python/stdlib/hashlib/examples/hashlib_md5_importlib.py
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,10 @@ | ||
# level: ERROR | ||
# start_line: 10 | ||
# end_line: 10 | ||
# start_column: 0 | ||
# end_column: 11 | ||
import importlib | ||
|
||
|
||
hashlib = importlib.import_module("hashlib") | ||
hashlib.md5() |
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