Commit Graph

933 Commits

Author SHA1 Message Date
Eric Traut
ece3d08002 Fixed handling of Tuple to match mypy behavior (and a clarified understanding of PEP 484). 2019-09-24 10:02:32 -07:00
Eric Traut
4c0003f663 Published 1.0.65 2019-09-23 22:30:33 -07:00
Eric Traut
2f0e3e2fdf Implemented alternative syntax for TypedDict. 2019-09-23 22:09:27 -07:00
Eric Traut
213427ea53 Fixed bug that caused public member variables with declared (annotated Literal types) to not accept a literal assigned value. 2019-09-23 20:36:27 -07:00
Eric Traut
f2dd164391 Fixed a few bugs in isDerivedFrom and _canAssignClassWithTypeArgs that caused some type violations to go unreported. 2019-09-23 20:20:58 -07:00
Eric Traut
e88a6e98f4 Changed Tuple to default to Tuple[...] rather than Tuple[] 2019-09-23 20:19:53 -07:00
Eric Traut
43f6b792bc Added hack in parser to avoid generating parse errors for strings inside of a Literal[] index statement. 2019-09-23 08:33:47 -07:00
Eric Traut
efc8ecf421 Started to implement support for TypedDict. 2019-09-23 00:32:07 -07:00
Eric Traut
9f283ee508 Updated typing_extensions.pyi file to reflect the latest in typeshed. 2019-09-22 19:06:37 -07:00
Eric Traut
ee1b911f42 Fixed small issue in combine method of datetime.pyi typeshed file. 2019-09-22 17:47:25 -07:00
Eric Traut
ca88b50d42 Simplified __add__ method in tuple. 2019-09-22 17:38:44 -07:00
Eric Traut
7b0aa89729 Updated typestub fallbacks to the latest typestubs from typeshed. 2019-09-22 17:09:40 -07:00
Eric Traut
36db2c8d53 Fixed type checks for functions and classes, which should be compatible with 'object'. 2019-09-22 17:09:18 -07:00
Eric Traut
d5e13278dc Published 1.0.64 2019-09-21 22:57:07 -07:00
Eric Traut
04c387e5f2 Removed console from AnalyzerFileInfo.
Fixed bug in type analyzer that caused some type checks relating to parameters to be missed.
Added to heuristic to determine when to strip literal type for private class member types.
2019-09-21 22:52:22 -07:00
Eric Traut
57ca2da3e6 Implemented type analysis support for comparison chaining. 2019-09-21 20:55:07 -07:00
Eric Traut
a109484776 Handled case where base type of call expression evaluates to a TypeVar type. 2019-09-21 20:29:13 -07:00
Eric Traut
232c13c093 Fixed bug in parser - it was not returning the correct node for type annotation comments. 2019-09-21 20:28:34 -07:00
Eric Traut
73f1589c89 Changed completion provider to not offer auto-import suggestions if no characters have been typed. 2019-09-21 20:27:28 -07:00
Eric Traut
d44e68932f Augmented static expression evaluator to handle AND and OR conditions. 2019-09-21 20:26:58 -07:00
Eric Traut
d2bf1e713b Fixed bug in auto-import completion. Wrong insertion point was being used when previous symbol had an alias ("as" clause). 2019-09-18 14:14:19 -07:00
Eric Traut
b2a3a8c396 Fixed a bunch of misspellings in the code thanks to a spell check extension for VS Code. 2019-09-18 09:29:57 -07:00
Eric Traut
0f7d33201c Added check for assignments or deletions of generic types. 2019-09-18 08:28:10 -07:00
Eric Traut
055577625b Updated README. 2019-09-18 00:25:20 -07:00
Eric Traut
4a311eaf03 Updated README to include "Find Symbols" support. 2019-09-18 00:17:03 -07:00
Eric Traut
0eecbae113 Published 1.0.63 2019-09-18 00:08:12 -07:00
Eric Traut
8b7ba5afcf Fixed broken test cases. 2019-09-18 00:02:57 -07:00
Eric Traut
a7ad901882 Fixed import culling logic to handle "__all__" assignments that occur prior to imports. 2019-09-17 23:54:22 -07:00
Eric Traut
12daab34ac Fixed recent regression in binder that resulted in global bindings being missed — and potentially a fatal assertion in the type analyzer. 2019-09-17 23:23:25 -07:00
Eric Traut
55a6460ce6 Removed debug code I accidentally left in place. 2019-09-17 22:52:50 -07:00
Eric Traut
77fa1b293b Fixed bug in handling of __all__ statements in type stub writer. 2019-09-17 22:47:50 -07:00
Eric Traut
bb6cd2455f Changed heuristic about whether to strip literal value from inferred class or instance member type. If it's not a constant or a private member, we now use the the more general type (not literal). 2019-09-17 20:23:06 -07:00
Eric Traut
d59e25124a Suppressed return type check for functions whose implementation consists only of "...". 2019-09-17 19:55:56 -07:00
Eric Traut
db191884df Fixed missing recursion count increment that led to a stack overflow. 2019-09-17 19:07:32 -07:00
Eric Traut
f2b5b0484e Changed tuple type expression evaluation to retain literals rather than strip them. 2019-09-17 18:47:57 -07:00
Eric Traut
4e6ec5e391 Added support for constraining the type of the RHS of an assignment statement based on the expected type of the LHS. 2019-09-17 18:32:44 -07:00
Eric Traut
f5fb41c921 Renamed expressionUtils to staticExpressions for clarity. 2019-09-16 09:04:32 -07:00
Eric Traut
a133604883 Further simplification of the binder module. 2019-09-15 22:29:57 -07:00
Eric Traut
464977dfd6 Simplified nonlocal and global name binding logic. 2019-09-15 21:55:56 -07:00
Eric Traut
3e6b1919dd Published 1.0.62 2019-09-15 16:06:27 -07:00
Eric Traut
06a16d26cd Improved completion suggestions for symbol imports when no text has been typed. Private symbols are now deprioritized. 2019-09-15 16:01:04 -07:00
Eric Traut
b2ad5c1f3d Improved responsiveness across service instances. Added minimum 500ms backoff time when the user is typing. 2019-09-15 16:00:14 -07:00
Eric Traut
67d3271c05 Added support for dataclass inheritance. 2019-09-15 14:35:45 -07:00
Eric Traut
bb25390644 Fixed printing of bytes literal values to include 'b' prefix. 2019-09-15 12:19:02 -07:00
Eric Traut
74d4b859ef Combined instanceFields and classFields into a single symbol table in ClassType. 2019-09-15 12:18:40 -07:00
Eric Traut
a83c46d229 Switched from __nonzero__ to __bool__ when checking for falsiness. The former was deprecated in python 3.0. 2019-09-15 11:11:17 -07:00
Eric Traut
18300ba5b6 Removed DeclarationCategory.Property since it can't be determined at binding time. 2019-09-14 18:10:22 -07:00
Eric Traut
52c8834f85 Removed typeSourceId from AnalyzerNodeInfo and replaced with an id field in every parse node. 2019-09-14 14:03:45 -07:00
Eric Traut
b9ab3cb7af Eliminated use of hacky ignoreTypeAnnotation field in AnalyzerNodeInfo. 2019-09-14 13:49:58 -07:00
Eric Traut
7a01835413 Added Property declaration category. 2019-09-14 13:17:15 -07:00