Eric Traut
639d7f3134
Added tests for type hints in comments.
2019-04-12 22:49:31 -07:00
Eric Traut
19a718f95f
Added support for old-style type hints in comments for assignment expressions.
2019-04-12 22:49:19 -07:00
Eric Traut
078c3f7016
Deleted python 2 fallback stubs, since they're not supported in pyright anyway.
2019-04-12 20:15:50 -07:00
Eric Traut
7c579c6ace
Removed TODO.
2019-04-12 20:11:42 -07:00
Eric Traut
f0846c2bb6
Added logic in expression evaluator to determine whether an expression can be read, written, or deleted. Removed related logic from parser, which was only able to deal with some of the cases.
2019-04-12 20:08:42 -07:00
Eric Traut
a2a5e18b6c
Added support for type annotations that involve embedded strings for forward references.
2019-04-12 17:37:13 -07:00
Eric Traut
30bfd6193a
Improved type checker's ability to analyze loop constructs.
2019-04-12 14:11:33 -07:00
Eric Traut
62de3ffcee
Another run at simplification.
2019-04-12 13:00:14 -07:00
Eric Traut
1e6726db80
Revert "Simplified logic in expression evaluator."
...
This reverts commit 3bd55574d5
.
2019-04-12 12:45:44 -07:00
Eric Traut
3bd55574d5
Simplified logic in expression evaluator.
2019-04-12 12:42:19 -07:00
Eric Traut
3cc0ab1cfc
Removed unnecessary TODO comment.
2019-04-12 11:38:41 -07:00
Eric Traut
d69486668b
Updated readme TODO list.
2019-04-12 11:38:15 -07:00
Eric Traut
df6858695e
Updated readme to check off the generators item.
2019-04-11 23:18:37 -07:00
Eric Traut
37a8d1b19a
Added more test cases for generator type checking and added some additional test cases.
2019-04-11 23:06:46 -07:00
Eric Traut
ebc1624f4c
Fixed bug in protocol type checks.
2019-04-11 22:47:47 -07:00
Eric Traut
27584fb50d
Initial implementation of type checking for generators.
2019-04-11 22:06:54 -07:00
Eric Traut
61c237b44c
Published 1.0.11
2019-04-11 18:59:01 -07:00
Eric Traut
0fd41aa2ef
Added extra parse node to index expression node to allow intermediate expression type to allow for caching of index expression for both correctness and performance.
2019-04-11 18:52:45 -07:00
Eric Traut
dbeafb5298
Added code to flag incorrect usage of ellipsis.
2019-04-11 15:54:16 -07:00
Eric Traut
ca19e81b32
Rewrote handling of data classes to address a bunch of limitations and bugs with the previous implementation. It now handles proper ordering, enforces default value rules, and synthesizes proper __new__ and __init__ methods.
2019-04-11 10:05:36 -07:00
Eric Traut
cfe3ebfb5e
Merge pull request #69 from zhangkaizhao/fix-print-compatible-in-python3
...
Fixed print compatible in Python 3
2019-04-11 07:42:04 -07:00
Kaizhao Zhang
86e0941c8c
Fixed print compatible in Python 3
2019-04-11 16:28:56 +08:00
Eric Traut
0cefede890
Added missing recursion check in Type.isSame method.
2019-04-11 00:28:51 -07:00
Eric Traut
137b08fa42
Simplified dataclass handling. Added support for @dataclass decorator.
2019-04-11 00:05:33 -07:00
Eric Traut
4ea6673e1e
Fixed some edge cases relating to constructor validation.
...
Changed lookUpClassMember to not search metaclasses.
Added 'object' base class if the only other base class was a metaclass.
2019-04-10 23:26:39 -07:00
Eric Traut
d068fa1831
Improved error reporting for abstract class instantiation; abstract methods are now reported with their containing class.
...
Silenced error for star expressions.
2019-04-10 13:53:44 -07:00
Eric Traut
d6ecb49427
Improved responsiveness of VS Code extension by decreasing the max analysis time from 1000 to 500ms.
2019-04-10 13:52:34 -07:00
Eric Traut
5323d14aa8
Treat ModuleType as though its derived from object.
2019-04-10 09:08:41 -07:00
Eric Traut
79ae22923a
Simplified logic for star expressions.
2019-04-10 09:08:15 -07:00
Eric Traut
c7d20308a9
Simplified semantic analyzer by removing needless member binding.
2019-04-10 01:14:54 -07:00
Eric Traut
0833a4f9b5
Published 1.0.10.
2019-04-10 00:54:12 -07:00
Eric Traut
f58ee2b8f4
Fixed a false positive error introduced with abstract class instantiation test.
2019-04-10 00:50:51 -07:00
Eric Traut
138abaa2dd
Removed unnecessary line from test file.
2019-04-10 00:23:29 -07:00
Eric Traut
b1b23d8749
Fixed local-file-to-URI conversion, which was broken for Windows.
2019-04-10 00:23:17 -07:00
Eric Traut
0c15af21bf
More fixes for Windows build and tests.
2019-04-09 23:52:06 -07:00
Eric Traut
d98fc96f66
Work to make the project build on Windows.
2019-04-09 23:42:12 -07:00
Eric Traut
d987dab938
Another tweak to dataclass logic.
2019-04-09 22:45:19 -07:00
Eric Traut
44ecaced49
Manually merged @mhzed's fixes since my interim changes created a merge conflict with the PR.
2019-04-09 22:38:26 -07:00
Eric Traut
ee658b59d0
Implemented code to flag attempts to instantiate an abstract type.
2019-04-09 22:19:54 -07:00
Eric Traut
eaaa2c5fde
Mitigated large performance regression due to recent changes.
2019-04-09 20:19:24 -07:00
Eric Traut
2e87d13396
More tweaking of README to eliminate some redundancy.
2019-04-09 19:59:59 -07:00
Eric Traut
e9d4d1e3cc
Moved isDataClass to expressionEvaluator so it could do a proper check for nested derivations of "namedtuple".
...
Moved _dataFields from ClassType to ClassDetails.
Conditionalized check for dataclass fields beginning with "_" based on python version 3.7 or newer.
Made other minor formatting changes for style consistency.
2019-04-09 18:37:07 -07:00
Eric Traut
2c0a9bc1a8
Merge pull request #60 from mhzed/namedtuple
...
Support for subclassing Namedtuple
2019-04-09 18:05:02 -07:00
Eric Traut
b5d0299de3
Added support for retrieving search paths from configured python interpreter.
2019-04-09 00:38:54 -07:00
Eric Traut
a9e0557803
Fixed exit code reporting for command-line verison.
2019-04-08 23:29:24 -07:00
Eric Traut
f76abff8cd
Further improvements to README.
2019-04-08 22:55:26 -07:00
Eric Traut
20d4137857
Merge pull request #63 from qubitron/master
...
Suggestions to update readme for VS Code clarifications
2019-04-08 22:49:46 -07:00
mhzed
7016a25cb1
Support for subclass typing.NamedTuple
2019-04-09 11:40:20 +08:00
Eric Traut
eaf2534aaa
Fixed a few test cases that were affected by other recent changes.
2019-04-08 18:19:18 -07:00
Eric Traut
10c266eccb
Fixed bug in isSameGenericCLass - it wasn't properly handling special built-in classes that don't necessarily share classDetails.
2019-04-08 18:19:04 -07:00