mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Python: Fix 'unused import' to no longer give alerts for imported modules used in doctests.
This commit is contained in:
@@ -61,3 +61,12 @@ import module1 as different
|
||||
#Use it
|
||||
different
|
||||
|
||||
import used_in_doctest
|
||||
|
||||
def f():
|
||||
'''
|
||||
>>> unrelated
|
||||
>>> used_in_doctest.thing() == f()
|
||||
True
|
||||
'''
|
||||
return 5
|
||||
|
||||
Reference in New Issue
Block a user