Commit Graph

1637 Commits

Author SHA1 Message Date
Eric Traut
06ff7316e7 Enhanced parser to generate dummy parse nodes when it encounters a decorator with no corresponding function or class declaration. This allows the completion provider to properly suggest type completion suggestions in this case. 2020-01-13 11:42:32 -08:00
Mikhail Arkhipov
46c2f1cc5c
Merge pull request #481 from MikhailArkhipov/lsbase
Refactor server code into a class
2020-01-12 21:44:33 -08:00
Eric Traut
7cb2e4d900 Fixed a ~5% performance regression that was introduced in 1.1.18 relating to abstract method checks. 2020-01-12 20:36:46 -08:00
Eric Traut
d5bbe423bb Published 1.1.20 2020-01-12 19:50:38 -08:00
Eric Traut
fd28183a6f Fixed regression from last check-in. 2020-01-12 19:49:03 -08:00
Eric Traut
1697555993 Implemented support for "Final" type annotation introduced in Python 3.8. 2020-01-12 19:37:23 -08:00
Eric Traut
42d35fa19e Enhanced TypeVar matching logic to handle the case where the first encounter with a TypeVar is contravariant but subsequent encounters are covariant or invariant, in which case we may be able to narrow the type from the initial guess. 2020-01-12 15:22:29 -08:00
Eric Traut
4c1bf5cf6a Fixed a few misspellings. 2020-01-11 10:57:30 -08:00
Eric Traut
1c45faab61 Fixed a bug in member access evaluation where the base type was a generic class. The logic was inappropriately specializing the class, inserting "Unknown" type arguments. 2020-01-11 10:56:11 -08:00
Eric Traut
194258e323 Fixed bug in isTypeSame. It wasn't properly taking into account specialized return types, so unions that contained two functions with different specialized return types were being deduped incorrectly. 2020-01-11 10:32:16 -08:00
MikhailArkhipov
520511c5c5 Fix connection init 2020-01-10 14:09:24 -08:00
MikhailArkhipov
cd590ff4fc Fix command id import 2020-01-10 13:50:02 -08:00
MikhailArkhipov
aa6d4e8b7d Merge branch 'master' of https://github.com/Microsoft/pyright into lsbase 2020-01-10 13:22:51 -08:00
MikhailArkhipov
9076f048db Refactor common code into a base class 2020-01-10 13:16:18 -08:00
Eric Traut
283d3114a7 Changed TypeVarMap from a type alias to its own class in anticipation of adding more functionality to it. 2020-01-09 19:55:00 -08:00
Eric Traut
55eeb19158 Published 1.1.19 2020-01-09 16:26:53 -08:00
Eric Traut
b408137f70 Fixed bug in TypeVar matching logic for case where a union includes multiple types, some of which are subclasses of the other. 2020-01-09 16:19:42 -08:00
Eric Traut
1b2f91e536 Fixed a bug in parser and a bug in completion provider that impacted completion suggestions within decorators. 2020-01-09 15:20:30 -08:00
Eric Traut
03271279d6 Added type constraint support for conditional expressions that include assignment (walrus) operators. 2020-01-09 14:48:31 -08:00
Eric Traut
e03712be1c Added new configuration setting reportImplicitStringConcatenation. 2020-01-09 00:38:23 -08:00
Eric Traut
5816ec1702 Added support for imaginary number literals. 2020-01-09 00:25:25 -08:00
Eric Traut
efb0b807ea Published 1.1.18 2020-01-06 21:25:29 -08:00
Eric Traut
2f17fbd15a Fixed bug in bidirectional type inference in case where provided object was subclassed from the expected type's class. 2020-01-06 21:20:36 -08:00
Eric Traut
e01025ad43 Changed type checker to enforce invariance of type arguments where appropriate. This includes union types. This change required updating the way list, set and dictionary literal types were determined via bidirectional type inference. 2020-01-06 20:22:23 -08:00
Eric Traut
686de0db52 Changed validateConstructorArgument, validateCallArguments and validateFunctionArguments to return an object rather than just a single so we can distinguish between argument type failures and missing return type. 2020-01-05 23:11:17 -08:00
Eric Traut
897b0894af Added new setting reportUnknownArgumentType that emits an error or warning when an argument's expression type is unknown or partially unknown. 2020-01-05 22:02:05 -07:00
Eric Traut
5b42b9c06f Fixed logic for detecting abstract methods that are not overridden. The previous logic didn't work when a mix-in class provided the implementation. 2020-01-05 13:00:34 -07:00
Eric Traut
140950dd8e Fixed bug in speculative evaluation mode where cached types from older speculative sessions were still being used in newer speculative sessions, giving the wrong answer. 2020-01-05 12:46:42 -07:00
Eric Traut
d7c915c1c3 Changed addDefaultParameters to use Any rather than Unknown. 2020-01-05 11:21:36 -07:00
Eric Traut
d53c1d6eae Changed validateConstructorArguments to honor new SkipConstructorCheck flag, and set it for the __init__ method of NamedTuple. 2020-01-05 11:21:14 -07:00
Eric Traut
f6a29e60fd Added new function flag to avoid performing __init__ check for named tuples. 2020-01-05 11:08:54 -07:00
Eric Traut
8875b4d2bf Changed assignment logic to not specialize class type on RHS to allow for unspecialized type aliases. 2020-01-05 11:06:24 -07:00
Eric Traut
30eba9b67d Added "unknown" check for return type declarations and return expressions. 2020-01-04 05:10:48 -07:00
Eric Traut
d39200ce6e Published 1.1.17 2020-01-02 15:52:04 -07:00
Eric Traut
c99ca3b440 Fixed unit tests broken by typeshed update. 2020-01-02 15:46:23 -07:00
Eric Traut
e75af3d0b0 Updated to the latest version of typeshed type stubs. 2020-01-02 15:31:11 -07:00
Eric Traut
95b7b3488e
Merge pull request #467 from rubenbelem/patch-1
Correction of README.md
2020-01-02 08:54:36 -07:00
Rúben Belém
ca8544384b
Correction of README.md
There was two "VS Code Integration" sessions, and the first had an incomplete content similar to the content of the second one.
2020-01-02 10:05:42 -04:00
Eric Traut
b039f6c118 Fixed error in comment. 2020-01-02 01:39:45 -07:00
Eric Traut
a25e832ad4 Added support for PEP 562's __getattr__ function. 2020-01-02 01:37:41 -07:00
Eric Traut
70753ed778 Fixed bug in type checking logic for homogenous tuples of arbitrary length. 2020-01-02 00:05:25 -07:00
Eric Traut
fe0692bd29 Fixed signature provider so it works with decorator calls. 2019-12-31 08:48:18 -07:00
Eric Traut
b93772e9d3 Fixed bug in handling of Protocol classes with generic type arguments. 2019-12-28 10:59:29 -07:00
Eric Traut
0a7f4dbb46 More formatting. 2019-12-28 10:57:27 -07:00
Eric Traut
6fa3c1809c Made indentation more consistent for multi-line if statements. 2019-12-28 10:20:35 -07:00
Eric Traut
5263dd7d45 Published 1.1.16 2019-12-27 23:15:57 -07:00
Eric Traut
edc0a0e8f3 Fixed recent regression in completion provider that caused a crash. 2019-12-27 23:12:45 -07:00
Eric Traut
536312919e Fixed bug that resulted in forward references to type aliases being reported as unbound. 2019-12-27 10:41:03 -07:00
Eric Traut
dfcf032223 Published 1.1.15 2019-12-26 14:33:21 -07:00
Eric Traut
3a053e33dd Added support for string literal completion suggestions in assignment statements. 2019-12-26 14:29:09 -07:00