Fix invalid type hinting of initial_channels in WS Connection
Description
Resolve : #460
Checklist
- [x] If code changes were made then they have been tested.
- [ ] I have updated the documentation to reflect the changes.
- [ ] I have updated the changelog with a quick recap of my changes.
- [x] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)
- [x] I have read and agree to the Developer Certificate of Origin for this contribution
@chillymosh Thank you for your feedback
I corrected all other instances.
I just wonder if the tuple[type] in the code below is okay? I mainly use 3.10 version, so Im a little confused about what syntax is available in 3.8.
https://github.com/PythonistaGuild/TwitchIO/blob/8e91cecebb5278016ce6217886b892983a5632cb/twitchio/ext/commands/errors.py#L75-L81
Our minimum supported version is 3.7, as such all changes should work on 3.7. You can download version 3.7 to verify these changes (or just tell pyright to use that version for type checking if using pyright, which is what we typically use).
tuple[...] is not valid in 3.7. You must use Tuple[...] using typing.Tuple.
Also to note: Version 2.x of twitchio does not follow strict type checking. Typing is used as hints through the code, not as a source of truth.