The suggestions continue to work regardless of what is typed into the editor.
The suggestions work up until the moment the @commands annotation is typed, and they stop working when the dot is entered.
Posted to pastebin as they're quite long.
Video demonstrating the issue.
As you can see here, the suggestions work up until the moment the @commands annotation is typed, and they stop working when the dot is entered.
from discord.ext import commands
@commands.command
async def test(ctx):
pass
Pipfile:[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
discord-py = "*"
[requires]
python_version = "3.7"
settings.json:{
"python.jediEnabled": false,
"python.analysis.logLevel": "Trace"
}
I can repro this. Looks like null reference exception
> Microsoft.Python.Analysis.dll!Microsoft.Python.Analysis.Analyzer.Symbols.FunctionEvaluator.TryDetermineReturnValue() Line 105 C#
Microsoft.Python.Analysis.dll!Microsoft.Python.Analysis.Analyzer.Symbols.FunctionEvaluator.Evaluate() Line 55 C#
Microsoft.Python.Analysis.dll!Microsoft.Python.Analysis.Analyzer.Symbols.ModuleSymbolTable.Evaluate(Microsoft.Python.Analysis.Analyzer.Symbols.MemberEvaluator e) Line 99 C#
Microsoft.Python.Analysis.dll!Microsoft.Python.Analysis.Analyzer.Symbols.ModuleSymbolTable.Evaluate(Microsoft.Python.Parsing.Ast.ScopeStatement target) Line 87 C#
Microsoft.Python.Analysis.dll!Microsoft.Python.Analysis.Analyzer.ModuleWalker.Walk(Microsoft.Python.Parsing.Ast.FunctionDefinition node) Line 197 C#
Microsoft.Python.Parsing.dll!Microsoft.Python.Parsing.Ast.FunctionDefinition.Walk(Microsoft.Python.Parsing.Ast.PythonWalker walker) Line 197 C#
Microsoft.Python.Parsing.dll!Microsoft.Python.Parsing.Ast.SuiteStatement.Walk(Microsoft.Python.Parsing.Ast.PythonWalker walker) Line 40 C#
Microsoft.Python.Parsing.dll!Microsoft.Python.Parsing.Ast.PythonAst.Walk(Microsoft.Python.Parsing.Ast.PythonWalker walker) Line 83 C#
Microsoft.Python.Analysis.dll!Microsoft.Python.Analysis.Modules.PythonModule.Analyze(Microsoft.Python.Parsing.Ast.PythonAst ast) Line 413 C#
Looks like same as https://github.com/microsoft/python-language-server/issues/1793
OK, so far I figured that LS does return proper completions on @commands. However, one of the items documentation causes VS Code markdown parser to choke and that brings down the editor...
parent: Optional[Command] is the problem b/c of unescaped [ which makes link without an URL.
Should this be filed on VS Code, given bad markdown can come from anywhere? Pretty strange that we could return a string that'd break the client.
0.5.8+, currently in beta channel
Most helpful comment
I can repro this. Looks like null reference exception