Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsc points to DIAGNOSTIC_SEVERITY_RULES.md which is deprecated #3589

Closed
fenchu opened this issue Nov 7, 2022 · 6 comments
Closed

vsc points to DIAGNOSTIC_SEVERITY_RULES.md which is deprecated #3589

fenchu opened this issue Nov 7, 2022 · 6 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@fenchu
Copy link

fenchu commented Nov 7, 2022

pylance==v2022.11.10

Pylance problems in vsc points to a deprecated file, and when you go to the new file:
https://github.com/microsoft/pyright/blob/main/docs/configuration.md#type-check-diagnostics-settings (anchor do not work)

https://github.com/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md missing

[{
	"resource": "/c:/dist/work/hso-fullstack-test/tests/test_10_phone_registration_en.py",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "reportGeneralTypeIssues",
		"target": {
			"$mid": 1,
			"external": "https://github.com/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md#diagnostic-severity-rules",
			"path": "/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md",
			"scheme": "https",
			"authority": "github.com",
			"fragment": "diagnostic-severity-rules"
		}
	},
	"severity": 8,
	"message": "Argument of type \"Literal['Resources']\" cannot be assigned to parameter \"__s\" of type \"slice\" in function \"__getitem__\"\n  \"Literal['Resources']\" is incompatible with \"slice\"",
	"source": "Pylance",
	"startLineNumber": 71,
	"startColumn": 20,
	"endLineNumber": 71,
	"endColumn": 37
}]
@erictraut
Copy link
Contributor

Moving to pylance-release since this is a pylance-specific problem. Pyright works as intended.

@erictraut erictraut transferred this issue from microsoft/pyright Nov 7, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Nov 7, 2022

Thanks for the bug.

It's not clear what the problem is? That the error points to a deprecated file?

@erictraut
Copy link
Contributor

Yeah, the link points to a deprecated file. This comes from the internal method getDocumentationUrlForDiagnosticRule, which Pylance overrides with its own URL.

@judej judej added the bug Something isn't working label Nov 7, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Nov 7, 2022

Talked this over at triage.

We thought it would be better to:

  • Fix the links to point to the pyright file (fix this issue)
  • Fix the pyright file to support linking to individual entries (by adding tags in the doc next to each item)
  • Fix pyright to jump to those individual entries
  • Remove the getDocumentationUrlForDiagnosticRule override in pylance

The original reason for this change was to not have to keep two copies of the documentation for the rules around.

@erictraut, thoughts?

@erictraut
Copy link
Contributor

Yeah, that proposal makes sense to me.

@rchiodo rchiodo added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Nov 7, 2022
@rchiodo rchiodo closed this as completed Nov 10, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Nov 10, 2022

This issue has been fixed in prerelease version 2022.11.21, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants