Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Fix disappearing completions #589

Merged
merged 268 commits into from
Feb 7, 2019
Merged
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
ad459bb
Baselines
Nov 28, 2018
dab1e22
Null ref
Nov 28, 2018
ca5aecf
Build break
Nov 28, 2018
bf1d77c
Overrides signatures
Nov 29, 2018
90e06d7
Fix typeinfo tests
Nov 29, 2018
b45ed3a
PR feedback
Nov 29, 2018
5b4f265
Infra to separate assembly
Nov 29, 2018
557eee7
Parser to own assembly
Nov 29, 2018
921c595
Parser tests to own assembly
Nov 30, 2018
ebda058
Unify to IndexSpan
Nov 30, 2018
b79b8c9
Better handle overloads
Dec 2, 2018
cbcf285
Merge branch 'analysis2' into analysis3
Dec 2, 2018
58405f9
Reorg, part I
Dec 2, 2018
190da75
Part II
Dec 2, 2018
ee0c612
Part III
Dec 3, 2018
e8a2df9
Part 4
Dec 4, 2018
eb8358d
Part 5
Dec 4, 2018
b15e821
Merge master
Dec 4, 2018
81720ef
Build breaks
Dec 4, 2018
5287ff0
Baselines
Dec 4, 2018
3dfff43
PR fix
Dec 4, 2018
6733fb8
Merge master
Dec 4, 2018
af1c64b
Merge build issues
Dec 4, 2018
6941e7d
Part 6
Dec 4, 2018
98067f1
Part 7
Dec 4, 2018
c12df18
Buildable
Dec 5, 2018
500e969
PR feedback
Dec 5, 2018
dd2f114
Merge master
Dec 5, 2018
b829969
Merge conflict
Dec 5, 2018
780757a
Fix #446
Dec 5, 2018
7bf1f38
Fix #446
Dec 5, 2018
710fc18
Merge branch 'analysis2' into analysis5
Dec 5, 2018
6fb8ef6
Part 8
Dec 6, 2018
32616d5
Part 9
Dec 6, 2018
aca9aea
Buildable
Dec 6, 2018
60bc841
Part 10
Dec 7, 2018
f3ac892
Part 11
Dec 7, 2018
6c62582
Part 12
Dec 8, 2018
4de6d73
Buildable
Dec 8, 2018
9f21d05
Part 14
Dec 8, 2018
542a469
First passing test
Dec 8, 2018
7a53a17
Simplify configuration
Dec 8, 2018
8badc5e
Style
Dec 8, 2018
e6d1e69
Fix test and move code to folders
Dec 9, 2018
f714cda
Builtins import
Dec 9, 2018
bba86a6
Fluents
Dec 10, 2018
e107d9c
Add search path
Dec 10, 2018
5815db9
Import analysis, part I
Dec 11, 2018
cccc6d8
Simplify builtins handling
Dec 11, 2018
281c293
Remove IMember
Dec 11, 2018
f42a5ce
Handle import specific
Dec 11, 2018
97092b5
More tests
Dec 11, 2018
f3df3fc
Add typeshed
Dec 12, 2018
cd3101b
Renames
Dec 12, 2018
a3c99bd
Make sure lazy modules are loaded
Dec 12, 2018
e9b737f
Renames
Dec 12, 2018
4c05da9
Move/rename
Dec 12, 2018
b29dd46
Rework importing
Dec 12, 2018
f4d4ea9
Derivation rework
Dec 13, 2018
fc27d94
Part 2
Dec 13, 2018
93fc881
Part 3
Dec 14, 2018
ec14152
Buildable
Dec 14, 2018
fdb79eb
Module members
Dec 15, 2018
fa180b7
Async walk
Dec 15, 2018
bcafc30
Imports test pass
Dec 15, 2018
dfafb94
Remove lazy types
Dec 15, 2018
39a396a
Fix from import
Dec 16, 2018
75bd509
Stubs
Dec 16, 2018
81d412a
Double overloads
Dec 17, 2018
1e1ce6a
Fix datetime test
Dec 17, 2018
fa08d5d
Merge master
Dec 17, 2018
6f80ebe
Couple more tests + fluents
Dec 17, 2018
4d0f002
Few more tests
Dec 17, 2018
d297e0f
Additionl test + union type
Dec 18, 2018
36fec2b
Built-in scrape tests
Dec 18, 2018
e6fd49e
Full stdlib scrape test
Dec 18, 2018
8673af0
Complete async AST walker
Dec 18, 2018
f6c1ce0
Conditional defines test + variable loc cleanup
Dec 19, 2018
4e30b36
More stub tests
Dec 19, 2018
d7c0672
Add some (broken mostly) tests from DDG
Dec 20, 2018
b615659
Move document tests
Dec 20, 2018
7a1d6e2
Function arg eval, part I
Dec 20, 2018
d3c8ec2
Instance/factory
Dec 21, 2018
84e8d78
Builds
Dec 22, 2018
dfe6c15
Test fixes
Dec 22, 2018
7cc74a2
Fix static and instance call eval
Dec 23, 2018
b6cb3dd
More tests
Dec 23, 2018
d3be9a6
More ported tests
Dec 24, 2018
55654f1
Specialize builtin functions
Dec 24, 2018
27c0336
Make walkers common and handle nested functions
Dec 25, 2018
55c4703
Moar tests
Dec 26, 2018
a5b104f
Parser fixes + more tests
Dec 26, 2018
078e675
Handle negative numbers
Dec 26, 2018
9137e79
Fix null ref
Dec 26, 2018
dc69e23
Basic list support
Dec 26, 2018
6941a64
Few more list tests
Dec 27, 2018
d2b22f8
Basic iterators
Dec 27, 2018
f65af0d
Support __iter__
Dec 27, 2018
051d422
Iterators
Dec 27, 2018
013b8f5
Fix couple of tests
Dec 28, 2018
fb5a3a5
Add decorator test
Dec 28, 2018
e4b02ad
Generics, part I
Dec 29, 2018
bd5948e
Generics, part 2
Dec 29, 2018
18a7021
Generics, part 3
Dec 30, 2018
2d0223c
Basic TypeVar test
Dec 30, 2018
9415e03
Typings, part 4
Dec 31, 2018
18565ec
Fix test
Dec 31, 2018
0083480
Generics, part 6
Dec 31, 2018
9a096de
Generics, part 7
Jan 1, 2019
534deca
More tests (failing)
Jan 2, 2019
adc81a8
Forward ref fixes
Jan 4, 2019
33d9f8e
Reorg
Jan 4, 2019
8688486
Improve symbol resolution + test fixes
Jan 5, 2019
d44790d
Test fixes
Jan 5, 2019
0678d18
Dictionary, part I
Jan 7, 2019
b83cbe0
Part 11
Jan 8, 2019
11eb84f
Fix test
Jan 8, 2019
4992fbc
Tests
Jan 8, 2019
4e38f55
Tests
Jan 8, 2019
d925a8b
More dict work
Jan 8, 2019
1223b58
List ctor
Jan 8, 2019
16b0788
Skip some tests for now
Jan 8, 2019
ab2f494
Fix iterators
Jan 9, 2019
d595653
Tuple slicing
Jan 9, 2019
549eb9c
Polish type comparo in return types
Jan 9, 2019
25152cd
Add Mapping and tests
Jan 9, 2019
141ef2b
Add Iterable
Jan 9, 2019
0cb9925
Fix typo
Jan 9, 2019
63d6669
Add Iterator[T] + test
Jan 9, 2019
dd1efa5
Simplify typing types
Jan 10, 2019
3a8bf43
Class reduction
Jan 10, 2019
eeddb85
Fix tests
Jan 10, 2019
11be2ea
Test fix
Jan 11, 2019
aeac9e1
Handle 'with' statement
Jan 11, 2019
2c9a0f6
Handle try-except
Jan 11, 2019
9f412a8
Class method inheritance + NewType
Jan 12, 2019
2c8583c
Container types
Jan 12, 2019
828e476
Containers test
Jan 12, 2019
8bbad5f
Tests
Jan 12, 2019
43dec18
Handle generic type alias
Jan 12, 2019
3603e12
Named tuple
Jan 12, 2019
449a36b
Global/non-local
Jan 12, 2019
4455a4c
Handle tuples in for
Jan 13, 2019
eeb6859
Basic generator
Jan 13, 2019
099c551
Any/AnyStr
Jan 13, 2019
dce9a26
Test fixes
Jan 13, 2019
a946ca5
Type/Optional/etc handling
Jan 14, 2019
4b7639a
Proper doc population
Jan 14, 2019
df69a4a
Tests + range
Jan 14, 2019
04eb76f
Argument match
Jan 15, 2019
cc05729
Basic argset and diagnostics
Jan 15, 2019
bef6ac7
Argset tests
Jan 15, 2019
f915b11
Exclude WIP
Jan 15, 2019
a6930c3
Exclude WIP
Jan 15, 2019
d021f5a
Arg eval
Jan 15, 2019
acad306
Arg match, part 2
Jan 16, 2019
c5d2492
Tests and generic arg comparisons
Jan 17, 2019
12f3b6e
Function eval with arguments
Jan 17, 2019
1836cb3
Baselines
Jan 17, 2019
89ba050
Fix test
Jan 17, 2019
7aa1228
Undo AST formatting change and update baseline
Jan 17, 2019
8034b36
LS cleanup 1
Jan 18, 2019
2489857
Fix list ctor argument unpacking
Jan 18, 2019
0271eec
Cleanup 2
Jan 18, 2019
e4abc92
Merge branch 'analysis5' into ls
Jan 18, 2019
6c83c40
Builds
Jan 18, 2019
d39659e
Partial completions
Jan 18, 2019
f56b29c
Partial
Jan 21, 2019
31ee0cb
Partial
Jan 21, 2019
7723b24
Simple test
Jan 22, 2019
4ba0d3e
Tests
Jan 22, 2019
16f902f
Basic startup
Jan 22, 2019
4a13bfe
Merge master
Jan 22, 2019
b91a6f5
Clean up a bit
Jan 22, 2019
429c229
Remove debug code
Jan 22, 2019
f7f8192
Port formatter tests
Jan 22, 2019
326c366
Fix tokenizer crash
Jan 22, 2019
52216fe
Async fixes
Jan 24, 2019
3479b0f
Hover
Jan 24, 2019
2ec0841
Basic hover
Jan 24, 2019
15bc660
Adjust expression options
Jan 24, 2019
637c459
Basic signature help
Jan 24, 2019
e9b029a
Fix class/instance
Jan 25, 2019
e52a55e
Update test
Jan 25, 2019
38897d6
Fix builtin creation exception
Jan 25, 2019
72c1e1f
Fix tests
Jan 25, 2019
c5ec4a7
Actually provide declared module
Jan 25, 2019
3695c27
Completion test (partial)
Jan 25, 2019
15815be
Undo
Jan 25, 2019
658d22e
Fix null await
Jan 25, 2019
696633a
Exports filtering
Jan 25, 2019
8a55917
Filter variables & exports
Jan 25, 2019
c34669f
Ported tests
Jan 26, 2019
4bf5eef
Test fixes
Jan 26, 2019
b7e7871
More ported tests
Jan 26, 2019
4b21373
Fix exception completions
Jan 26, 2019
c895721
Import completions
Jan 27, 2019
47adf4a
Scope completions
Jan 27, 2019
376d8fd
With completions
Jan 27, 2019
28b6966
Test fixes
Jan 27, 2019
4555555
Test fix
Jan 27, 2019
9dd1082
Better arg match
Jan 28, 2019
368c108
Temp disable WIP
Jan 28, 2019
d20e668
WIP
Jan 27, 2019
d81d2ad
First cut
Jan 28, 2019
bbfba92
Fix type leak
Jan 28, 2019
4551b72
Merge branch 'ls2' into genclass
Jan 28, 2019
658ea03
WIP
Jan 28, 2019
9745c2e
Remove ConfigureAwait and handle canceled and failed in the analysis …
Jan 28, 2019
cee54c6
Merge branch 'ls' into genclass
Jan 28, 2019
aa8b564
WIP
Jan 28, 2019
3b88852
Generic class base
Jan 29, 2019
f003ed2
Merge branch 'ls2' into ls
Jan 29, 2019
6631dca
Generic forward reference resolution
Jan 29, 2019
1323bca
Suppress completion in strings + test
Jan 29, 2019
f8e6155
Prevent recursion on generic resolution
Jan 29, 2019
bf36c69
Merge branch 'genclass' into ls
Jan 29, 2019
e1b16e6
Handle call expression in generics
Jan 30, 2019
28e9cb7
Merge branch 'genclass' into ls
Jan 30, 2019
b4ce645
Relax condition as it happens in tensorflow
Jan 30, 2019
4421368
Fix typeshed version search
Jan 30, 2019
23baa1f
Hover tests
Jan 30, 2019
e50ac3e
Fix prom import hover
Jan 31, 2019
53faa6e
Hover tests
Jan 31, 2019
04044aa
Synchronize test cache writing
Jan 31, 2019
4ba8adf
First cut
Jan 31, 2019
d445554
Test
Jan 31, 2019
7eac7b3
Fixes
Jan 31, 2019
0b66f68
Add tests for os.path
Jan 31, 2019
295ec2d
Fix cache check
Jan 31, 2019
fd43b3a
Improve resolution of builtins and typing in stubs
Jan 31, 2019
db42ae2
Merge tests
Jan 31, 2019
c04fea9
Merge branch 'ls' into gotodef
Feb 1, 2019
b81c730
Add ntst for requests
Feb 1, 2019
4aca77f
Handle typeshed better
Feb 1, 2019
22d0cd0
Fix custom stub handling
Feb 1, 2019
ef58112
Better sync
Feb 1, 2019
79f9213
Merge branch 'ls' into gotodef
Feb 1, 2019
44c504c
Move files
Feb 1, 2019
db33d86
Fix parameter locations
Feb 2, 2019
4a28d0a
Hover improvement
Feb 3, 2019
99550ba
PEP hints
Feb 4, 2019
a929764
One more test for PEP hints
Feb 4, 2019
2259ac3
Better handle hover over import as
Feb 5, 2019
79f911c
Text based generic constraints
Feb 6, 2019
b7cd4c6
Handle with better with generic stubs
Feb 6, 2019
df7533c
Undo debug
Feb 6, 2019
5c34ceb
Handle non-binary open()
Feb 6, 2019
41cd358
Use proper scope when analyzing module
Feb 7, 2019
bbb042f
Merge master
Feb 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ public IDisposable OpenScope(IPythonModule module, ScopeStatement node, out Scop
return Disposable.Empty;
}

var gs = module.GlobalScope as Scope ?? GlobalScope;
// During analysis module global scope has not changed yet since it updates
// When the analysis completed. Therefore if module is the one we are
// analyzing, use scope from the evaluator rather than from the module.
var gs = Module.Equals(module) || module == null ? GlobalScope : module.GlobalScope as Scope;
if (node.Parent != null) {
fromScope = gs
.TraverseBreadthFirst(s => s.Children.OfType<Scope>())
Expand Down