Skip to content

[Calc] typechecking improvements#154

Merged
Vexed01 merged 1 commit intoVexed01:masterfrom
Evanroby:calc-typechecking
Mar 6, 2026
Merged

[Calc] typechecking improvements#154
Vexed01 merged 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
@Vexed01
Copy link
Owner

Vexed01 commented Mar 6, 2026

Looks good, thank you!

@Vexed01 Vexed01 changed the title Calc: typechecking improvements [Calc] typechecking improvements Mar 6, 2026
@Vexed01 Vexed01 merged commit 9020050 into Vexed01:master Mar 6, 2026
11 checks passed
@Evanroby Evanroby deleted the calc-typechecking branch March 6, 2026 17:35
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.

2 participants