@@ -46,7 +46,6 @@ export interface ModuleNameAndType {
46
46
export interface ModuleImportInfo extends ModuleNameAndType {
47
47
isTypeshedFile : boolean ;
48
48
isThirdPartyPyTypedPresent : boolean ;
49
- isModulePrivate : boolean ;
50
49
}
51
50
52
51
export interface ModuleNameInfoFromPath {
@@ -936,7 +935,6 @@ export class ImportResolver {
936
935
importType : ImportType . Local ,
937
936
isStubFile : false ,
938
937
isNativeLib : false ,
939
- isModulePrivate : false ,
940
938
implicitImports : new Map < string , ImplicitImport > ( ) ,
941
939
filteredImplicitImports : new Map < string , ImplicitImport > ( ) ,
942
940
nonStubImportResult : undefined ,
@@ -1120,7 +1118,6 @@ export class ImportResolver {
1120
1118
let importType = ImportType . BuiltIn ;
1121
1119
let isLocalTypingsFile = false ;
1122
1120
let isThirdPartyPyTypedPresent = false ;
1123
- const isModulePrivate = false ;
1124
1121
let isTypeshedFile = false ;
1125
1122
1126
1123
const importFailureInfo : string [ ] = [ ] ;
@@ -1163,7 +1160,6 @@ export class ImportResolver {
1163
1160
isTypeshedFile : true ,
1164
1161
isLocalTypingsFile,
1165
1162
isThirdPartyPyTypedPresent,
1166
- isModulePrivate,
1167
1163
} ;
1168
1164
}
1169
1165
}
@@ -1300,14 +1296,7 @@ export class ImportResolver {
1300
1296
}
1301
1297
1302
1298
if ( moduleName ) {
1303
- return {
1304
- moduleName,
1305
- importType,
1306
- isTypeshedFile,
1307
- isLocalTypingsFile,
1308
- isThirdPartyPyTypedPresent,
1309
- isModulePrivate,
1310
- } ;
1299
+ return { moduleName, importType, isTypeshedFile, isLocalTypingsFile, isThirdPartyPyTypedPresent } ;
1311
1300
}
1312
1301
1313
1302
if ( allowInvalidModuleName && moduleNameWithInvalidCharacters ) {
@@ -1317,7 +1306,6 @@ export class ImportResolver {
1317
1306
importType,
1318
1307
isLocalTypingsFile,
1319
1308
isThirdPartyPyTypedPresent,
1320
- isModulePrivate,
1321
1309
} ;
1322
1310
}
1323
1311
@@ -1328,7 +1316,6 @@ export class ImportResolver {
1328
1316
importType : ImportType . Local ,
1329
1317
isLocalTypingsFile,
1330
1318
isThirdPartyPyTypedPresent,
1331
- isModulePrivate,
1332
1319
} ;
1333
1320
}
1334
1321
@@ -1368,7 +1355,6 @@ export class ImportResolver {
1368
1355
let implicitImports = new Map < string , ImplicitImport > ( ) ;
1369
1356
let packageDirectory : Uri | undefined ;
1370
1357
let pyTypedInfo : PyTypedInfo | undefined ;
1371
- let isModulePrivate = false ;
1372
1358
1373
1359
// Handle the "from . import XXX" case.
1374
1360
if ( moduleDescriptor . nameParts . length === 0 ) {
@@ -1393,12 +1379,7 @@ export class ImportResolver {
1393
1379
for ( let i = 0 ; i < moduleDescriptor . nameParts . length ; i ++ ) {
1394
1380
const isFirstPart = i === 0 ;
1395
1381
const isLastPart = i === moduleDescriptor . nameParts . length - 1 ;
1396
- const namePart = moduleDescriptor . nameParts [ i ] ;
1397
- dirPath = dirPath . combinePaths ( namePart ) ;
1398
-
1399
- if ( SymbolNameUtils . isProtectedName ( namePart ) ) {
1400
- isModulePrivate = true ;
1401
- }
1382
+ dirPath = dirPath . combinePaths ( moduleDescriptor . nameParts [ i ] ) ;
1402
1383
1403
1384
if ( useStubPackage && isFirstPart ) {
1404
1385
dirPath = dirPath . addPath ( stubsSuffix ) ;
@@ -1514,12 +1495,6 @@ export class ImportResolver {
1514
1495
importFound = resolvedPaths . length >= moduleDescriptor . nameParts . length ;
1515
1496
}
1516
1497
1517
- // Modules are considered private only if they are stub files or located
1518
- // within a py.typed package.
1519
- if ( ! isStubFile && ! pyTypedInfo ) {
1520
- isModulePrivate = false ;
1521
- }
1522
-
1523
1498
return {
1524
1499
importName,
1525
1500
isRelative : false ,
@@ -1536,7 +1511,6 @@ export class ImportResolver {
1536
1511
isNativeLib,
1537
1512
implicitImports,
1538
1513
pyTypedInfo,
1539
- isModulePrivate,
1540
1514
filteredImplicitImports : implicitImports ,
1541
1515
packageDirectory,
1542
1516
} ;
0 commit comments