Commit Graph

4977 Commits

Author SHA1 Message Date
Eric Traut
4c61507d05 Added debug code for printing expression type evaluations. 2022-03-27 09:58:13 -06:00
Eric Traut
f0c20ee5bc Fixed test cases. 2022-03-26 22:33:38 -06:00
Eric Traut
776970f117 Fixed bug that resulted in a false negative when assigning an invariant type var was specialized with a protocol type. 2022-03-26 22:23:20 -06:00
Eric Traut
177ea4d79d Fixed regression that caused false positive error when protocol match involved a property that returned a type that was generic. 2022-03-25 11:34:53 -06:00
Eric Traut
15f6164788 Fixed style issue 2022-03-24 14:34:41 -06:00
Eric Traut
865213ea1f Fixed a bug that resulted in incorrect import resolution when the import referenced an empty directory within the stubspath. It should continue searching for imports in other locations in this case. 2022-03-24 14:25:01 -06:00
Eric Traut
7da6ceb5f2 Removed unused parameter for an internal function. 2022-03-24 09:39:38 -06:00
Eric Traut
6ad10bcf18 Modified algorithm for calculating the complexity of a function's code flow. 2022-03-24 01:13:01 -06:00
Eric Traut
1a93ab1be2 Added test case for complex code flow. 2022-03-24 01:12:37 -06:00
Eric Traut
f1cd3c19c2 Fixed crashing bug due to stack overflow when traversing the code flow graph. 2022-03-24 01:09:59 -06:00
Eric Traut
1c51248c8f Updated hashes for minimist 2022-03-23 15:20:57 -06:00
Eric Traut
a40622df0d Updated one more instance of minimist. 2022-03-23 15:08:33 -06:00
Eric Traut
3f86a00a72 Updated "minimist" dependency to address potential vulnerability. 2022-03-23 15:06:48 -06:00
PylanceBot
dd7420c58e
[PylanceBot] Pull Pylance with Pyright 1.1.232 (#3243)
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
2022-03-23 13:45:46 -07:00
Eric Traut
33b04005ee Fixed broken test 2022-03-23 09:43:07 -06:00
Eric Traut
068b67200f Updated the reportUnusedExpression check to also report diagnostics for a simple name expression as a standalone statement. 2022-03-23 09:40:24 -06:00
Eric Traut
8a69070892 When hovering over the LHS of an augmented assignment (e.g. the a within a += x), reveal the type of the symbol _after_ the operation rather than _before_. 2022-03-23 07:29:19 -06:00
Eric Traut
7d050c49bb Published 1.1.232 2022-03-23 00:01:37 -06:00
Eric Traut
7bbafcde1e Fixed bug that resulted in false positive when overriding a method with position-only parameters when the base uses the old-style mechanism and the override uses the new-style / separator or vice versa. 2022-03-22 10:26:11 -06:00
Eric Traut
f89c35a4c6 Improved modeling of property class so its fget, fset, fdel, __get__, __set__ and __delete__ methods are updated properly when adding a setter or deleter. 2022-03-22 08:49:35 -06:00
Eric Traut
0ce0cfa10f Fixed false positive error that occurs when assigning a class variable with a type annotation an expression that involves the name of the class variable symbol. 2022-03-21 13:24:04 -06:00
Eric Traut
4edb1b4b8e Added support for new assert_type call, which is being added to Python 3.11 and typing_extensions. 2022-03-21 11:27:08 -06:00
Eric Traut
d78f737f11 Updated typeshed stubs to the latest version. 2022-03-21 10:42:15 -06:00
Eric Traut
f1467d9e7e Fixed style issue 2022-03-21 09:44:31 -06:00
Eric Traut
401c5c447f Fixed a false positive error relating to __slots__ when using a descriptor object that was assigned to a class variable in a base class. 2022-03-21 09:32:53 -06:00
Eric Traut
e615b3ec5a Lowered cyclical code complexity threshold for code flow analysis in an attempt to reduce stack overflow crashes. 2022-03-21 08:41:19 -06:00
Eric Traut
0ddaf12496 Improved the reportIncompatibleMethodOverride check to report a diagnostic if the base method provides a default argument value for a parameter but the override does not. 2022-03-21 08:17:36 -06:00
Eric Traut
189f0314bb Another attempt at formatting 2022-03-20 14:35:38 -06:00
Eric Traut
fadeea36b4 Updated diagnostic rule table so it groups basic and strict diagnostics. 2022-03-20 14:34:42 -06:00
Eric Traut
ca72a6796a Modified the special-case logic for property so it exposes methods and attributes provided by object. 2022-03-20 14:13:25 -06:00
Eric Traut
72d246fc4f Fixed bug that resulted in false negative when assigning one function to another and the dest contains named positional arguments that have no corresponding positional slot in the dest and the dest does not contain a **kwargs. 2022-03-20 00:32:34 -06:00
Eric Traut
b9c40662c5 Improved diagnostic messages for overload implementation mismatch. 2022-03-20 00:30:55 -06:00
Eric Traut
9c8575e884 Published 1.1.231 2022-03-19 00:17:00 -06:00
Eric Traut
220634d56b Fixed a bug that resulted in a false positive error when a generic callback protocol was passed as an argument to another generic callback protocol. 2022-03-19 00:08:12 -06:00
Eric Traut
f4fd30eb44 Fixed bug in "--verifytypes" feature. It was ignoring a missing parameter annotation for the first parameter in a non-method function. 2022-03-18 16:44:24 -06:00
Eric Traut
3f388f1786 Fixed bug that resulted in incorrect type evaluation when a generic type alias parameterized with a ParamSpec was specialized multiple times. 2022-03-18 14:50:13 -06:00
Eric Traut
b19c6fa0d2 Fixed a bug that resulted in misleading output when printing the type of a generic alias that includes a generic function parameterized by a ParamSpec and is later specialized. 2022-03-18 14:12:21 -06:00
Eric Traut
4c18033543 Fixed bug that resulted in a false positive error when matching a module against a specialized generic protocol class. 2022-03-16 23:47:45 -06:00
PylanceBot
d2d8122be5
[PylanceBot] Pull Pylance with Pyright 1.1.230 (#3205)
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
2022-03-16 14:07:58 -07:00
Eric Traut
2d27a2c73f Fixed false negative for the reportIncompatibleMethodOverride diagnostic check. It was not detecting the case where the base method used keyword parameters but the override method used position-only parameters. 2022-03-16 09:54:50 -06:00
Eric Traut
5f5ea41e88 Moved a couple of type-related diagnostics under the reportGeneralTypeIssues diagnostic rule rather than reporting them unconditionally. 2022-03-16 08:32:50 -06:00
Eric Traut
bf16b1b8b6 Published 1.1.230 2022-03-16 01:40:10 -06:00
Eric Traut
2f5046b545 Added support for the use of Concatenate as a type argument for a generic type alias that accepts a ParamSpec. 2022-03-15 16:38:40 -06:00
Eric Traut
0eecc996b8 Fixed bug that resulted in false positive reportIncompatibleVariableOverride error when one base class defined a symbol as a property and another base class defined a symbol as Any. 2022-03-15 14:32:04 -06:00
Eric Traut
8dd4de0101 Updated typeshed stubs to the latest. 2022-03-15 14:09:10 -06:00
Eric Traut
b2e234ec11 Fixed two bugs that generated false positive errors when using PEP 604 union syntax in an implicit type alias. The first bug affected the case where the union started with None. The second affected the case where a TypeVar was included in the union. 2022-03-15 13:47:37 -06:00
Eric Traut
6c335d90e2 Improved the heuristics in the alias resolution logic to prefer declarations that are in non-exception paths even if the exception path has a typed decl and the non-exception decl must be inferred. 2022-03-15 11:11:38 -06:00
Eric Traut
4a07abd998 Fixed bug in pattern exhaustive match logic that failed to detect exhaustive match when the subject expression was a unnarrowable expression form. 2022-03-15 01:23:38 -06:00
Eric Traut
0dfe8ef0b7 Added special-case logic for a Type[T] (where T is an unbound TypeVar) that is instantiated through a call to its constructor. It should evaluate to T rather than Any. 2022-03-15 00:29:14 -06:00
Eric Traut
5ea3ae41e4 Changed redundant type name so type evaluator can be compiled with --emitDeclarationOnly option. 2022-03-14 23:14:27 -06:00