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

eventemitter should raise TypeError when there isn't enough arguments passed on emit #293

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

theomonnom
Copy link
Member

No description provided.

@theomonnom theomonnom requested a review from a team October 18, 2024 23:48
@theomonnom theomonnom changed the title event-emitter should raise TypeError when there isn't enough args eventemitter should raise TypeError when there isn't enough args Oct 18, 2024
Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

if we are passing 3 args, but user only needs two, it seems like we could make it work by passing in less?

@theomonnom
Copy link
Member Author

theomonnom commented Oct 19, 2024

if we are passing 3 args, but user only needs two, it seems like we could make it work by passing in less?

it is the case

calls.append((first, second, third))

emitter.emit("whatever", 1, 2, 3)
emitter.emit("whatever", 1, 2, 3, 4, 5) # only 3 arguments will be passed
Copy link
Member Author

Choose a reason for hiding this comment

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

check here

@theomonnom theomonnom changed the title eventemitter should raise TypeError when there isn't enough args eventemitter.emit should raise TypeError when there isn't enough args Oct 19, 2024
@theomonnom theomonnom changed the title eventemitter.emit should raise TypeError when there isn't enough args eventemitter should raise TypeError when there isn't enough arguments passed on emit Oct 19, 2024
@theomonnom theomonnom merged commit 5494b63 into main Oct 19, 2024
11 checks passed
@theomonnom theomonnom deleted the theo/emitter-fix branch October 19, 2024 04:00
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