-
Notifications
You must be signed in to change notification settings - Fork 133
Conversation
Added settings plumbing to turn linter on/off via existing extension setting. |
There are a few false positives, which can be seen in
|
Any specific for function arguments? |
That seemed to fix many of the cases, but some still seem to be reported, like:
|
Fix declaration of variables in for loop
Yes, analysis was missing handling of comprehension (list) statements, handling of tuple expressions in for loops as well as handling of lambdas. Basically analysis issues, less of that of the linter. Related #734 which also requires the above. |
Speaking of imports @AlexanderSher can comment. I think there are different cases when imported variable was declared as unknown (and hence IS defined technically) vs code didn't even reach state of declarations as, I guess, happens with I'll look into the iterator |
Yes, we don't support CPython. |
Right, but I think what is weird is that in one case, if the imported module doesn't exist like |
* Fix microsoft#668 (partial) * Undef variables, first cut * Reorg * Tests * Tests * Tests * Revert "Tests" This reverts commit 7ffc9db. * Options and tests * Don't squiggle builtin-ins * Test for function arguments * Fix tuple assignment in analysis * Don't false positive on functions and classes forward references * Disable tracking assignment location Fix declaration of variables in for loop * Track multiple locations * Tests * using * Properly look at locations * Comprehensions etc * Test update * Add support for lambdas * Add lambda linting * Handle tuple assignment better * Test update * Correct comprehension iterator handlint * Fix race condition at builtins load * Merge master * Restore linter
Fixes #639
Fixes #395
Fixes #461
Fixes #475
Fixes #476
Fixes #513
Fixes #682
Fixes #734
for in
loops.