Commit Graph

5016 Commits

Author SHA1 Message Date
Eric Traut
ee4f833005 Fixed default value of reportMissingModuleSource setting in JSON schema. It should be "warning", not "none". 2020-09-02 01:08:40 -07:00
Eric Traut
7fd612ad70 Fixed bug in tokenizer that cause line numbers to be off when an invalid token occurred at the end of a line. 2020-09-02 00:28:36 -07:00
Eric Traut
58a349b50e Added check for raise statements that take an exception class but the class constructor requires one or more arguments. 2020-09-01 21:26:10 -07:00
Eric Traut
e168e338dd Fixed an incorrect diagnostic rule for reportMissingTypeArgument. 2020-09-01 20:52:37 -07:00
Eric Traut
e190d4ddef Fixed handling of scopes for nested classes. The previous logic allowed an inner class to access variables defined in an outer class, which is not permitted. 2020-09-01 20:35:08 -07:00
Eric Traut
9e46548fc5 Added new "reportMissingTypeArgument" diagnostic rule and enabled it by default in "strict" mode. It generates a diagnostic when a generic class or generic type alias is used in an annotation with no type arguments provided. Also fixed a bunch of inaccurate settings defaults in pyright's package.json. 2020-09-01 15:59:31 -07:00
Eric Traut
7f7ff556bc
Suppress the use of "Unnecessary" diagnostic hints (used to display variables and code blocks in gray) if the LSP client claims not to support this tag. (#984)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2020-08-31 14:46:51 -07:00
Eric Traut
f3bbfc3d9a Changed the behavior of the import resolution logic to fail an import resolution of a multi-part name (e.g. "a.b.c") if it can't be fully resolved. This could produce false positives in cases where third-party libraries are using dynamic tricks to manipulate their package namespace, but it will eliminate false negatives. 2020-08-30 11:48:50 -07:00
Eric Traut
e43b5a5c55 Changed heuristics for function return type inference so methods that raise a NotImplementedError and have no other return path have an inferred return type of Unknown rather than NoReturn. Such methods should be marked as abstract, but frequently they are not. 2020-08-30 08:13:41 -07:00
Eric Traut
aa63c1d14f Improved completion provider to distinguish properties from other methods. 2020-08-29 21:23:14 -07:00
Eric Traut
520d685d97 Changed handling of dataclass classes that derive from a class whose type is unknown. The synthesized constructor now allows any parameter list in this case. 2020-08-29 16:21:31 -07:00
Eric Traut
e454a96b3e Changed the handling of old-style comment method annotations to accept an optional annotation for "self" and "cls" parameters. 2020-08-29 15:33:40 -07:00
Eric Traut
81d74de105 Eliminated incorrect error when "super()" was used in a class where one or more parent classes were of an unknown type. 2020-08-29 15:18:21 -07:00
Eric Traut
f7e5a9975c Updated typeshed fallback stubs to the latest. 2020-08-29 14:51:55 -07:00
Jake Bailey
8038b391a6
Run install:all in style checker, fix desynced package-lock.json (#979) 2020-08-28 22:57:00 -07:00
Jake Bailey
da39a2a78a
Convert repo into a lerna monorepo, add a validation workflow (#978) 2020-08-28 19:46:48 -07:00