mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Python: py/import-deprecated-module handle backwards compatible code
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
| test.py:2:8:2:13 | ImportExpr | The rfc822 module was deprecated in version 2.3. Use email module instead. |
|
||||
| test.py:3:8:3:16 | ImportExpr | The posixfile module was deprecated in version 1.5. Use email module instead. |
|
||||
| test.py:8:16:8:18 | ImportExpr | The md5 module was deprecated in version 2.5. Use hashlib module instead. |
|
||||
| test.py:14:10:14:12 | ImportExpr | The md5 module was deprecated in version 2.5. Use hashlib module instead. |
|
||||
|
||||
@@ -7,7 +7,7 @@ class Foo(object):
|
||||
def foo(self):
|
||||
import md5
|
||||
|
||||
# TODO: Backwards compatible code, should not report
|
||||
# Backwards compatible code, should not report
|
||||
try:
|
||||
from hashlib import md5
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user