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

refactor: make methods use the MISSING value #455

Merged
merged 27 commits into from Jan 29, 2022
Merged

refactor: make methods use the MISSING value #455

merged 27 commits into from Jan 29, 2022

Conversation

EdVraz
Copy link
Contributor

@EdVraz EdVraz commented Jan 25, 2022

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

@EdVraz EdVraz marked this pull request as ready for review January 25, 2022 17:51
@EdVraz EdVraz mentioned this pull request Jan 25, 2022
8 tasks
@EdVraz EdVraz changed the title refactor methods to use the MISSING value refactor: make methods use the MISSING value Jan 26, 2022
interactions/api/models/channel.py Outdated Show resolved Hide resolved
interactions/api/models/member.py Outdated Show resolved Hide resolved
interactions/api/models/member.pyi Outdated Show resolved Hide resolved
@EdVraz EdVraz 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.

@EdVraz
Copy link
Contributor Author

EdVraz commented Jan 28, 2022

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.

@EdVraz
Copy link
Contributor Author

EdVraz 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.

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

ok, I'll do that

@EdVraz EdVraz requested a review from i0bs January 28, 2022 18:51
@EdVraz EdVraz 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.

None yet

2 participants