Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: correct the signature of .events() #1342

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

PietroPasotti
Copy link
Contributor

Fixes #1341

@tonyandrewmeyer tonyandrewmeyer changed the title fixed signature of .events() fix: correct the signature of .events() Aug 26, 2024
@tonyandrewmeyer
Copy link
Contributor

Thanks! Curious that pyright doesn't complain about this.

@PietroPasotti
Copy link
Contributor Author

I think it didn't because all attributes that were accessed were coincidentally common between the two types :)
they both talked like ducks

Copy link
Contributor

@tonyandrewmeyer tonyandrewmeyer left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

The main case seems very straightforward - the code is clearly wanting the bound event - it's even asserting on it. The error message probably works either way, but I'm +0 on this adjustment.

The framework one should indeed be working with bound events - the class has the source, the instance has the bound event.

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Thanks!

@tonyandrewmeyer tonyandrewmeyer merged commit 7969187 into canonical:main Aug 26, 2024
32 of 33 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Framework.ObjectEvents.events has wrong signature
3 participants