1.1.373 issue - Expected class but received "Literal[0]" & Too few type arguments provided for "FixtureFunction" #8608
Replies: 3 comments 6 replies
-
I'm not able to repro what you're seeing. If I install the "sqlalchemy-stubs` package, I see no errors from pyright. I'm guessing that you have something else installed in your venv that's affecting the results. Are you able to repro the problem with a clean venv? My understanding is that sqlalchemy 2.x is fully typed — that is, it has inline type information — and that it doesn't require the use of an external stub library. By adding the stub library, you're overriding the type information provided by the library maintainers with outdated and incomplete type information. I think the stub library is intended for use with sqlalchemy 1.x, which didn't have type information. You might want to try removing it from your environment. If I don't install |
Beta Was this translation helpful? Give feedback.
-
Moving to a discussion topic because I don't think this is a bug in pyright. |
Beta Was this translation helpful? Give feedback.
-
Googling for I have bumped pyright in a project and got a multitude of these as well. The issue seems to stem from the pytest-asyncio package. For some reason, as soon as I think this can serve as a minimal repro case: import pytest_asyncio
pytest_asyncio.fixture
def f(x):
x["y"] Output:
Packages:
It seems like this issue appeared in 1.1.373. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
In version
1.1.373
I'm getting a bunch of cryptic errors with code that passed fine in version1.1.372
.Code or Screenshots
I was able to create a minimal example:
You can see the full error logs in my github actions workflow: https://github.com/lexicalunit/spellbot/actions/runs/10168666850/job/28123798890
VS Code extension or command-line
However, if I run
pyright
on a single file, I get no error:It only happens when I execute
pyright
on all my files.Additional Information
Beta Was this translation helpful? Give feedback.
All reactions