You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect owner_id to always be an int, otherwise, update the documentation to show it can also be None
Actual Results
Got an error because int | None doesn't match a return type of int
Type "int | None" is not assignable to return type "int"
Type "int | None" is not assignable to type "int"
"None" is not assignable to "int"Pylance[reportReturnType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportReturnType)
Intents
All, while testing
System Information
- Python v3.12.4-final
- disnake v2.10.1-final
- disnake importlib.metadata: v2.10.1
- aiohttp v3.11.11
- system info: Windows 11 10.0.22631 AMD64
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
I checked the code and the docs and can confirm this bug. I will open a pull request within 24 hours to fix this. Could you also link the relative path to the file where this function is defined (And its line number if possible)
Summary
Guild.owner_id documented as
int
, but isOptional[int]
in codeReproduction Steps
Declare return type as int and try to return owner_id. Strict type checking enabled in vscode.
Minimal Reproducible Code
Expected Results
I expect owner_id to always be an int, otherwise, update the documentation to show it can also be None
Actual Results
Got an error because
int | None
doesn't match a return type ofint
Intents
All, while testing
System Information
Checklist
Additional Context
No response
The text was updated successfully, but these errors were encountered: