Closed Josverl closed 8 months ago
Thanks for the issue. This was caused by the change to add URI support. Fix should be in the next release.
This is addressed in pyright 1.1.341, which I just published.
Looks like this is back with pyright 1.1.346.
npm exec --yes -- pyright@1.1.346 --outputjson
:
{
"version": "1.1.346",
"time": "1705328887095",
"generalDiagnostics": [
{
"uri": {
"_key": "/home/radek/weareeight/Bundle-Builder/core/views.py",
"_filePath": "/home/radek/weareeight/Bundle-Builder/core/views.py",
"_query": "",
"_fragment": "",
"_isCaseSensitive": true,
"_formattedString": "file:///home/radek/weareeight/Bundle-Builder/core/views.py"
},
"severity": "error",
"message": "Cannot access member \"xyz\" for type \"HttpRequest\"\n Member \"xyz\" is unknown",
"range": {
"start": {
"line": 299,
"character": 16
},
"end": {
"line": 299,
"character": 19
}
},
"rule": "reportGeneralTypeIssues"
}
],
"summary": {
"filesAnalyzed": 580,
"errorCount": 1,
"warningCount": 0,
"informationCount": 0,
"timeInSec": 12.999
}
}
npm exec --yes -- pyright@1.1.345 --outputjson
:
{
"version": "1.1.345",
"time": "1705328981656",
"generalDiagnostics": [
{
"file": "/home/radek/weareeight/Bundle-Builder/core/views.py",
"severity": "error",
"message": "Cannot access member \"xyz\" for type \"HttpRequest\"\n Member \"xyz\" is unknown",
"range": {
"start": {
"line": 299,
"character": 16
},
"end": {
"line": 299,
"character": 19
}
},
"rule": "reportGeneralTypeIssues"
}
],
"summary": {
"filesAnalyzed": 580,
"errorCount": 1,
"warningCount": 0,
"informationCount": 0,
"timeInSec": 13.729
}
}
1.1.346 has uri
but doesn't have file
.
@rchiodo, looks like one of your recent changes introduced another regression here. Could you please prioritize a fix for this? Also, let's look for a way to add a unit test to prevent future regressions like this.
@rchiodo, actually, I've implemented a fix, and I'm going to do a hot-fix release since this regression will have a big impact on many pyright users.
This is fixed in a hot-fix release of pyright 1.1.347, which I just published. @rnovacek, thanks for reporting the problem (again), and apologies for the regression.
Works as expected, thank you @erictraut
npm exec --yes -- pyright@1.1.347 --outputjson
:
{
"version": "1.1.347",
"time": "1705348060881",
"generalDiagnostics": [
{
"file": "/home/radek/weareeight/Bundle-Builder/core/views.py",
"severity": "error",
"message": "Cannot access member \"xyz\" for type \"HttpRequest\"\n Member \"xyz\" is unknown",
"range": {
"start": {
"line": 299,
"character": 16
},
"end": {
"line": 299,
"character": 19
}
},
"rule": "reportGeneralTypeIssues"
}
],
"summary": {
"filesAnalyzed": 580,
"errorCount": 1,
"warningCount": 0,
"informationCount": 0,
"timeInSec": 12.369
}
}
Finding When running pyright 1.1.340 the schema for json outputs appears to have changed Specifically the
generalDiagnostics
file: string
attribute appears to be missing and replaced by auri
attribute with a different schema.the problem does not appear for 1.1.339
npx pyright@1.1.339 --project /workspaces/micropython-stubs/tests/quality_tests/feat_stdlib --outputjson
Returns the expected schema.Code or Screenshots
VS Code extension or command-line