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

🐛 Fix bound method as callback #187

Merged
merged 1 commit into from
Sep 25, 2024
Merged

🐛 Fix bound method as callback #187

merged 1 commit into from
Sep 25, 2024

Conversation

YousefEZ
Copy link
Owner

@YousefEZ YousefEZ commented Sep 25, 2024

meant to remedy the following

class Event:
    async def on_button_click(self, item: I, interaction: discord.Interaction) -> None: 
         ...


async def some_command(ctx: QalibInteraction) -> None: 
     my_event = Event()
     await ctx.display("something", callables={"button": my_event.on_button_click})

as it would lose the bound method

version: patch

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 5086bef1 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5086bef) Report Missing Report Missing Report Missing
Head commit (c6e9a63) 2199 2179 99.09%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#187) 16 16 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@YousefEZ YousefEZ changed the title 🐛 Ffix bound method as callback 🐛 Fix bound method as callback Sep 25, 2024
@YousefEZ YousefEZ merged commit eeacf6b into main Sep 25, 2024
9 checks passed
@YousefEZ YousefEZ deleted the fixCallbackBinding branch September 25, 2024 11:56
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.

1 participant