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

Add thread arguments to GuildChannel.edit + applied tags to edit_cannel #1474

Merged
merged 21 commits into from
Feb 5, 2023

Conversation

ZechCodes
Copy link
Contributor

@ZechCodes ZechCodes commented Jan 15, 2023

Summary

Implements GuildThreadChannel.edit to add support for thread-specific edit fields. Also adds support for applied tags in RESTClient.edit_channel.

MyPy fails because the signature of GuildThreadChannel.edit no longer matches the signature of GuildChannel.edit. Uncertain how to proceed with that.

Checklist

  • I have run nox and all the pipelines have passed.
  • I have made unittests according to the code I have added/modified/deleted.

Related issues

#1053

@ZechCodes
Copy link
Contributor Author

Just to reiterate. I have run Nox.

MyPy fails because the signature of GuildThreadChannel.edit no longer matches the signature of GuildChannel.edit. Uncertain how to proceed with that.

@ZechCodes
Copy link
Contributor Author

#1053 Also this issue is very likely related. I'd be willing to do what's necessary to close it, just need guidance on the next step.

@GoogolGenius
Copy link
Contributor

MyPy fails because the signature of GuildThreadChannel.edit no longer matches the signature of GuildChannel.edit. Uncertain how to proceed with that.

Wouldn't you add these new arguments to the signature for GuildChannel.edit instead of overriding in the GuildThreadChannel which violates type safety? Or am I just being very stupid? Please correct me if I'm wrong.

hikari/channels.py Outdated Show resolved Hide resolved
hikari/channels.py Outdated Show resolved Hide resolved
changes/1474.bugfix.md Outdated Show resolved Hide resolved
hikari/channels.py Outdated Show resolved Hide resolved
tests/hikari/test_channels.py Outdated Show resolved Hide resolved
hikari/impl/rest.py Show resolved Hide resolved
hikari/impl/rest.py Show resolved Hide resolved
@ZechCodes
Copy link
Contributor Author

I've merged what I had in GuildThreadChannel.edit into GuildChannel.edit. I've removed the test I added for GuildThreadChannel.edit and updated the existing test for GuildChannel.edit to cover the new additions.

I've also updated the test for RESTClient.edit_channel to cover both the flags and the new applied_tags parameters.

hikari/api/rest.py Outdated Show resolved Hide resolved
@FasterSpeeding FasterSpeeding changed the title Implement thread edit method Add thread arguments to GuildChannel.edit + applied tags to edit_cannel Jan 17, 2023
Copy link
Member

@davfsa davfsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty for working on this and spotting the missing arguments!

hikari/api/rest.py Outdated Show resolved Hide resolved
hikari/api/rest.py Show resolved Hide resolved
@davfsa davfsa added the enhancement New feature or request label Jan 24, 2023
@davfsa davfsa requested a review from FasterSpeeding January 30, 2023 12:35
@davfsa davfsa added enhancement New feature or request and removed enhancement New feature or request labels Feb 5, 2023
@davfsa davfsa merged commit 36073a1 into hikari-py:master Feb 5, 2023
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.

4 participants