Skip to content

Conversation

@EepyElvyra
Copy link
Contributor

About

This pull request refactors methods to use the MISSING value

Checklist

  • I've ran pre-commit to format and lint the change(s) made.
  • I've checked to make sure the change(s) work on 3.8.6 and higher.
  • This fixes/solves an Issue.
    • (If existent):
  • I've made this pull request for/as: (check all that apply)
    • Documentation
    • Breaking change
    • New feature/enhancement
    • Bugfix

@EepyElvyra EepyElvyra marked this pull request as ready for review January 25, 2022 17:51
@EepyElvyra EepyElvyra changed the title refactor methods to use the MISSING value refactor: make methods use the MISSING value Jan 26, 2022
@EepyElvyra EepyElvyra requested a review from i0bs January 28, 2022 16:55
Copy link
Contributor

@i0bs i0bs left a comment

Choose a reason for hiding this comment

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

I'm not going to comment on every single file needing the Optional, but they should target the object that they need. For example, embeds should be Optional[Union[Embed, List[Embed]] and vice versa.

@EepyElvyra
Copy link
Contributor Author

But i can't import it due to circular import

And if I'd put it there without having it imported I'd not pass the pre-commit

@i0bs
Copy link
Contributor

i0bs commented Jan 28, 2022

How are you hitting circular imports?
Additionally, if there is no way for you to realistically import it, set the type annotation with a string. "Embed" can also suffice.

@EepyElvyra
Copy link
Contributor Author

How are you hitting circular imports? Additionally, if there is no way for you to realistically import it, set the type annotation with a string. "Embed" can also suffice.

Message is importing Channel and member, so I can't import Embed from Message

ok, I'll do that

@EepyElvyra EepyElvyra requested a review from i0bs January 28, 2022 18:51
@EepyElvyra EepyElvyra requested a review from i0bs January 29, 2022 17:40
@i0bs i0bs merged commit 04ff07d into interactions-py:unstable Jan 29, 2022
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