Incorrect "variable is not accessed" messages #719
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Environment data
Expected behaviour
When a variable is passed to a function/method that Pylance couldn't introspect (sometimes it's not possible for various reasons), it should not be considered unused.
Actual behaviour
It's grayed out with "
variable
is not used" message on hover.Code Snippet / Additional information
I think the best thing I can do here is to show an image of actual code.
Stream.from_postgres_increment
is a class method, but it's nowhere to be found inStream
class definition: it's actually loaded later on via entry_points mechanism. Pylance can't run introspection on it (and that's totally OK), but the problem is that it also counts all variables passed to this method as unused, while they are obviously used.I don't think there's anything actually "breaking" here, it's more of a logic problem, so I skipped the logs. Will add if you need them.
The text was updated successfully, but these errors were encountered: