Open StellaHuang95 opened 3 months ago
The _buildStdlibCache
in importResolver.ts
finds all the stdlib
modules in typeshed stdlib
to return a Set
with all the names. sys
in typeshed
is a directory but not a file, so it doesn't get added in.
Environment data
Repro Steps
"reportShadowedImports": "error"
insettings.json
sys.py
andmailbox.py
Expected behavior
I am expecting to see 2 diagnostics:
"xxx\folder1\mailbox.py" is overriding the stdlib module "mailbox"
and"xxx\folder1\sys.py" is overriding the stdlib module "sys"
Actual behavior
Only getting 1 diagnostic:
"xxx\folder1\mailbox.py" is overriding the stdlib module "mailbox"
Only repros with certain
stdlib
modules such asos
,json
,sys