-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set
isThirdPartyImport
and isThirdPartyPyTypedPresent
for interim…
… files (#6155)
- Loading branch information
Showing
19 changed files
with
217 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packages/pyright-internal/src/tests/fourslash/completions.importInterimFile.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @filename: test1.py | ||
//// import al[|/*marker1*/|] | ||
|
||
// @filename: altair/__init__.py | ||
// @library: true | ||
//// """module docstring""" | ||
//// | ||
//// __all__ = [ "selection_interval" ] | ||
//// | ||
//// from .vegalite import ( | ||
//// selection, | ||
//// selection_interval | ||
//// ) | ||
|
||
// @filename: altair/vegalite/__init__.py | ||
// @library: true | ||
//// def selection(): pass | ||
//// def selection_interval(): pass | ||
|
||
// @filename: altair/py.typed | ||
// @library: true | ||
//// # has to contain something for file to be written | ||
|
||
{ | ||
// Force interim file to be created | ||
// @ts-ignore | ||
await helper.verifyCompletion('included', 'markdown', { | ||
marker1: { | ||
completions: [ | ||
{ label: 'altair', kind: Consts.CompletionItemKind.Module, documentation: 'module docstring' }, | ||
], | ||
}, | ||
}); | ||
|
||
helper.replace(helper.BOF, helper.getPosition('marker1'), 'import altair as alt\n\nalt.'); | ||
|
||
// @ts-ignore | ||
await helper.verifyCompletion('included', 'markdown', { | ||
marker1: { | ||
completions: [{ label: 'selection_interval', kind: Consts.CompletionItemKind.Function }], | ||
}, | ||
}); | ||
|
||
// @ts-ignore | ||
await helper.verifyCompletion('excluded', 'markdown', { | ||
marker1: { | ||
completions: [{ label: 'selection', kind: Consts.CompletionItemKind.Function }], | ||
}, | ||
}); | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/completions.wildcardimports.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.classes.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.fields.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.functions.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.methods.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.parameters.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.variables.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findDefinitions.wildcardimports.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/findTypeDefinitions.classes.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/hover.class.docString.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/hover.docFromSrc.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
packages/pyright-internal/src/tests/fourslash/hover.wildcardimports.fourslash.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.