Rich Chiodo
67d23318b7
Completions and signature help for PEP 692 ( #4599 )
...
* Completions and signature help for PEP 692
* Fix comment
* More comment changes
* Use common function for parameter checking
* Review feedback
* Update comment
* More review feedback
2023-02-10 16:41:31 -08:00
Heejae Chang
662bcb539a
Use binary search in findNodeByOffset if we can. ( #4607 )
...
* use binary search in findNodeByOffset if we can
* address PR feedbacks
2023-02-10 15:27:20 -08:00
Eric Traut
06917bb920
Removed typeshed tensorflow stubs because they're too incomplete at this time. This addresses https://github.com/microsoft/pylance-release/issues/3937 .
2023-02-10 06:16:24 -08:00
Eric Traut
5d735d40b2
Fixed a bug that results in a false positive error when using Self
in a type annotation for a parameter with a default value. This addresses https://github.com/microsoft/pyright/issues/4605 .
2023-02-09 21:38:06 -08:00
Eric Traut
2191a20105
Fixed false negative error where an attempt to assign a value of type type[T]
to type T
was not flagged as an error. This addresses https://github.com/microsoft/pyright/issues/4609 .
2023-02-09 20:45:58 -08:00
Eric Traut
e7e19af579
Fixed a false negative where a variable used within a TypeAlias
definition was not flagged as an error. This addresses https://github.com/microsoft/pyright/issues/4598 .
2023-02-08 20:59:42 -08:00
PylanceBot
dec6aa2096
[PylanceBot] Pull Pylance with Pyright 1.1.293 ( #4595 )
...
Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
2023-02-08 13:42:49 -08:00
Eric Traut
4eb4397a90
Updated documentation for default exclude settings.
2023-02-08 13:09:55 -08:00
Eric Traut
f3a7ba79f1
Fixed a bug that led to a false positive error when using a type alias within an __init__
or __hash__
method in a dataclass. This addresses https://github.com/microsoft/pyright/issues/4596 .
2023-02-08 12:01:29 -08:00
Eric Traut
ceb2a2d5a4
Published 1.1.293
2023-02-07 21:22:44 -08:00
Eric Traut
06e750935f
Fixed bug in signature help that resulted in incorrect or misleading signature for a constructor call when the __init__
method accepts no arguments. This addresses https://github.com/microsoft/pylance-release/issues/3916 .
2023-02-07 08:54:44 -08:00
Eric Traut
8b0c7257d7
Updated typeshed stubs to the latest.
2023-02-06 16:49:13 -08:00
Eric Traut
a0e80925c7
Fixed bug that resulted in a false positive when using a ParamSpec with an overloaded function.
2023-02-06 16:38:17 -08:00
Eric Traut
492332796a
Implemented support for overloaded functions captured by a ParamSpec. This addresses https://github.com/microsoft/pyright/issues/4572 .
2023-02-05 20:53:59 -08:00
Eric Traut
e6fbf54730
Added error for a dataclass that uses a private attribute name that appears within a synthesized __init__
method. This addresses https://github.com/microsoft/pyright/issues/4584 .
2023-02-04 23:52:54 -08:00
Eric Traut
8632688b4b
Simplified typeVarContext by combining tuple types into main TypeVar map entries.
2023-02-04 13:43:19 -08:00
Eric Traut
9dabb3a3cf
Fixed a bug that led to a false positive error when a magic method (such as in a binary operation) was used with bidirectional type inference. This addresses https://github.com/microsoft/pyright/issues/4576 .
2023-02-04 13:01:04 -08:00
Eric Traut
fa88fbd571
Fixed false negative bug when checking for valid use of identifiers within a type annotation. Variables used within a type annotation should always generate an error, even if the variable is imported from another file. This addresses https://github.com/microsoft/pyright/issues/4582 .
2023-02-04 08:23:19 -08:00
Eric Traut
f4d022b829
Fixed a bug that resulted in a false positive error and incorrect type evaluation when a lambda is evaluated with an incomplete "expected" type. This addresses https://github.com/microsoft/pyright/issues/4567 .
2023-02-03 23:32:02 -08:00
PylanceBot
a822ae55d3
[PylanceBot] Pull Pylance with Pyright 1.1.292 ( #4581 )
2023-02-03 15:55:13 -08:00
Eric Traut
dd08483a90
Improved handling of a class declaration that uses a dynamic unpacked argument type to define its base classes. This addresses https://github.com/microsoft/pyright/issues/4580 .
2023-02-03 14:02:44 -08:00
Bill Schnurr
3a8155d572
modifying class and function signatures to make them more textmate co… ( #4575 )
2023-02-03 11:10:28 -08:00
Eric Traut
6078f13404
Added specialized logic to better handle imports of the form from .x import x
where x
is later referenced from an inner scope within the module. This addresses https://github.com/microsoft/pyright/issues/4579 .
2023-02-03 09:56:20 -08:00
dependabot[bot]
dbc5c4232d
Bump http-cache-semantics from 4.1.0 to 4.1.1 ( #4578 )
...
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics ) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases )
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1 )
---
updated-dependencies:
- dependency-name: http-cache-semantics
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-03 07:12:43 -08:00
Eric Traut
d1a8be7b7a
Tweaked the "type complexity" heuristic to produce more intuitive results in the constraint solver. This addresses https://github.com/python/typing/discussions/1342 .
2023-02-02 15:20:13 -08:00
Eric Traut
cb2c338335
Fixed a bug that resulted in an inconsistent "import not accessed" diagnostic based on evaluation ordering.
2023-02-02 13:12:28 -08:00
Eric Traut
b3ff34f90b
Marked PEP 698 as no longer "draft" since it was accepted.
2023-02-02 07:53:44 -08:00
Eric Traut
cca7588f76
Fixed a regression that resulted in a crash when resolving overloads with different numbers of parameters and with with arguments that evaluate to Any
. This addresses https://github.com/microsoft/pyright/issues/4564 .
2023-02-01 10:19:29 -08:00
Bill Schnurr
c1ea8b3b66
pull from pylance feb1 ( #4565 )
2023-02-01 10:05:56 -08:00
Eric Traut
e0799d8e5d
Fixed a bug that resulted in incorrect type evaluation when accessing instance methods directly from a None
instance. This addresses https://github.com/microsoft/pyright/issues/4562 .
2023-02-01 08:10:14 -08:00
Eric Traut
f8eb114de3
Fixed a few typos in the pyright documentation.
2023-02-01 08:09:36 -08:00
Eric Traut
e4e08c359f
Published 1.1.292
2023-01-31 18:39:32 -08:00
Eric Traut
bee1466d4a
Fixed a bug that led to a false positive error about an "unknown type" in certain cases when using an assignment expression (walrus operator) in a loop. This addresses https://github.com/microsoft/pyright/issues/4557 .
2023-01-31 16:52:11 -08:00
Eric Traut
1d461eac65
Addressed performance issue in code that includes loops and many interdependencies between variables with inferred types. The optimization involves the introduction of an incomplete type generation count that is updated when a the type cache is updated in a way that could affect previously-calculated incomplete types. This addresses https://github.com/microsoft/pyright/issues/4231 .
2023-01-31 15:29:16 -08:00
Eric Traut
6df39e49fd
Changed speculative type cache to return full cache entry in prep for a subsequent optimization.
2023-01-31 15:23:45 -08:00
Eric Traut
27211b8d6e
Disabled type narrowing for expressions of the form "<literal> == X" and <literal> != X". These were never documented to work, and they were causing significant performance issues. Also reverted recent attempt to modify the code complexity algorithm, as this change is no longer necessary. This addresses https://github.com/microsoft/pylance-release/issues/3886#issuecomment-1410116374 .
2023-01-31 07:58:17 -08:00
Eric Traut
3a97d0263b
Fixed a bug in the handling of file specs (globs) used for the "include" configuration option. A directory wildcard pattern (**) was not handled correctly. This addresses https://github.com/microsoft/pyright/issues/4553 .
2023-01-30 22:31:37 -08:00
Eric Traut
a503d72e0d
Modified overload matching algorithm to more closely match that of mypy. In the case where one or more arguments evaluate to Any but those arguments map to parameters whose types are the same, the first overload is selected. Only in cases where an Any argument produces ambiguous results is an Unknown result produced. This addresses https://github.com/microsoft/pyright/issues/4546 .
2023-01-30 21:44:09 -08:00
PylanceBot
88a32c7168
[PylanceBot] Pull Pylance with Pyright 1.1.291 ( #4554 )
2023-01-30 15:45:56 -08:00
Eric Traut
0176543898
Fixed a bug that led to a false negative when a backslash character was used within an expression segment of an f-string. This addresses https://github.com/microsoft/pyright/issues/4552 .
2023-01-30 06:31:04 -08:00
Eric Traut
16b5b9a404
Fixed bug that resulted in a false positive when trying to assign a value of type NoneType
to type[object]
. This addresses https://github.com/microsoft/pyright/issues/4550 .
2023-01-30 06:04:41 -08:00
Eric Traut
e5fd048b99
Improved type narrowing for truthy tests that involve int
, str
or bytes
values. In the negative case, we can assume that the type is Literal[0]
, Literal['']
or Literal[b'']
.
2023-01-29 11:54:05 -08:00
Eric Traut
50fadd7146
Fixed bug in command-line version of pyright that led to the inclusion of file names in the output diagnostic report in cases where diagnostics were completely suppressed for that file using the --level
option. This addresses https://github.com/microsoft/pyright/issues/4549 .
2023-01-29 11:09:05 -08:00
Eric Traut
38f2ceaab3
Fixed grammar in diagnostic message.
2023-01-29 10:57:30 -08:00
Eric Traut
7d65fa690e
Fixed a bug that resulted in incorrect type narrowing for discriminated TypedDict types when the narrowed expression includes a member access subexpression. This addresses https://github.com/microsoft/pyright/issues/4548 .
2023-01-29 09:53:43 -08:00
Eric Traut
95315d1b99
Fixed broken test case.
2023-01-29 08:02:16 -08:00
Eric Traut
248e5bd4ea
Updated code complexity calculation in binder to take into account the number of unique expressions that are affected by branch and loop nodes in the code flow graph. This addresses https://github.com/microsoft/pyright/issues/4519 .
2023-01-29 07:44:15 -08:00
Eric Traut
cce89d8212
Updated typeshed stubs to the latest version.
2023-01-27 22:32:36 -08:00
Eric Traut
d2643158c5
Extended the reportUnnecessaryComparison
check to also handle conditions of the form x is None
and x is not None
.
2023-01-27 10:11:59 -08:00
Eric Traut
b17f64ddcb
A few more tweaks to the documentation for consistency.
2023-01-27 09:29:38 -08:00