Files
codeql/python/ql/test/query-tests/Imports/deprecated/test.py
2026-06-15 16:15:17 +01:00

15 lines
312 B
Python

# Some deprecated modules
import rfc822 # $ Alert
import posixfile # $ Alert
# We should only report a bad import once
class Foo(object):
def foo(self):
import md5 # $ Alert
# Backwards compatible code, should not report
try:
from hashlib import md5
except ImportError:
from md5 import md5