Skip to content

Calc: typechecking improvements#154

Open
Evanroby wants to merge 1 commit intoVexed01:masterfrom
Evanroby:calc-typechecking
Open

Calc: typechecking improvements#154
Evanroby wants to merge 1 commit intoVexed01:masterfrom
Evanroby:calc-typechecking

Conversation

@Evanroby
Copy link
Contributor

fixes this Pylance typechecking error:

[{
	"resource": "/c:/Users/Cedric/Desktop/cogs/Vex-Cogs/calc/calc.py",
	"owner": "Pylance",
	"code": {
		"value": "reportIncompatibleMethodOverride",
		"target": {
			"$mid": 1,
			"path": "/microsoft/pylance-release/blob/main/docs/diagnostics/reportIncompatibleMethodOverride.md",
			"scheme": "https",
			"authority": "github.com"
		}
	},
	"severity": 8,
	"message": "Method \"red_delete_data_for_user\" overrides class \"CogMixin\" in an incompatible manner\n  Return type mismatch: base method returns type \"CoroutineType[Any, Any, NoReturn]\", override returns type \"CoroutineType[Any, Any, None]\"\n    \"CoroutineType[Any, Any, None]\" is not assignable to \"CoroutineType[Any, Any, NoReturn]\"\n      Type parameter \"_ReturnT_nd_co@CoroutineType\" is covariant, but \"None\" is not a subtype of \"NoReturn\"\n        Type \"None\" is not assignable to type \"NoReturn\"",
	"source": "Pylance",
	"startLineNumber": 38,
	"startColumn": 15,
	"endLineNumber": 38,
	"endColumn": 39,
	"relatedInformation": [
		{
			"startLineNumber": 886,
			"startColumn": 15,
			"endLineNumber": 886,
			"endColumn": 39,
			"message": "Overridden method",
			"resource": "/c:/Users/Cedric/AppData/Local/Programs/Python/Python311/Lib/site-packages/redbot/core/commands/commands.py"
		}
	],
	"origin": "extHost1"
}]

and reformats a bit using Ruff.

@Evanroby Evanroby requested a review from Vexed01 as a code owner October 15, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant