pinterior
pinterior
i understand, it's time to use something like `Either[L, R]`.
I see. and, I have another question: If in case types are `int` and `Never` , is it possible for Pylance to infer `int` instead of the current `Unknown`, considering...
not reproducible in 1.1.412
possibly because `.venv` is not excluded. it is excluded by `'**/.*'` pattern in `defaultExcludes` by default, but `defaultExcludes` is not used when `exclude` option is manually specified. https://github.com/microsoft/pyright/blob/8b02aa84ec916697e76d5ee69299a89d555ec98c/packages/pyright-internal/src/analyzer/service.ts#L800-L815
type inference by assignment has never caused problems for me, but it seems that mixing subscription assignments and other dict-modification methods may cause some type confusion. ```py from typing import...
I could repro the problem with pandas-stubs. repro log ``` $ docker run --rm -it python:3.12 bash root@6593ae67e432:/# pip install pandas (snip) Installing collected packages: pytz, tzdata, six, numpy, python-dateutil,...
the problem seems to in the following: - `UniqueNameMap.build`: self recursion reaches `recursionCount > maxTypeRecursionCount` condition even when there is only a single `f_0` - `Generator`'s first type argument (`int...
it looks like a duplicate of #10987, and 1.1.408 does not have the problem.
https://github.com/microsoft/pyright/blob/main/docs/type-concepts.md#type-declarations > If a variable or parameter has no type annotation, Pyright will assume that any value can be assigned to it. after the first assignment, `component` has type `list[int]`;...
#11807 already exists to fix is the problem.