Skip to content

feat!: Client.on_error() improvement with new parameter#1945

Merged
Lulalaby merged 13 commits intoPycord-Development:masterfrom
guardboi:patch-1
May 31, 2023
Merged

feat!: Client.on_error() improvement with new parameter#1945
Lulalaby merged 13 commits intoPycord-Development:masterfrom
guardboi:patch-1

Conversation

@guardboi
Copy link
Contributor

@guardboi guardboi commented Feb 26, 2023

Edited _run_event to pass the exception to on_error.

Summary

in client.py, line 381 has included as exc in order to pass an exception into Client.on_error. This has also been changed in line 438 to 448, changing how the error is printed as well. This makes it easier to use on_error with this small change.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
  • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

Edited _run_event to pass the exception to on_error.

Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
@guardboi guardboi requested a review from a team as a code owner February 26, 2023 00:18
pre-commit-ci bot and others added 2 commits February 26, 2023 00:18
Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Merging #1945 (37a8bd2) into master (e3ee572) will not change coverage.
The diff coverage is 33.33%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1945   +/-   ##
=======================================
  Coverage   33.13%   33.13%           
=======================================
  Files          97       97           
  Lines       19136    19136           
=======================================
  Hits         6340     6340           
  Misses      12796    12796           
Flag Coverage Δ
macos-latest-3.10 33.11% <33.33%> (ø)
macos-latest-3.11 33.11% <33.33%> (ø)
macos-latest-3.8 33.12% <33.33%> (ø)
macos-latest-3.9 33.12% <33.33%> (ø)
ubuntu-latest-3.10 33.11% <33.33%> (ø)
ubuntu-latest-3.11 33.11% <33.33%> (ø)
ubuntu-latest-3.8 33.12% <33.33%> (ø)
ubuntu-latest-3.9 33.12% <33.33%> (ø)
windows-latest-3.10 33.11% <33.33%> (ø)
windows-latest-3.11 33.11% <33.33%> (ø)
windows-latest-3.8 33.12% <33.33%> (ø)
windows-latest-3.9 33.12% <33.33%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
discord/client.py 27.23% <33.33%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3ee572...37a8bd2. Read the comment docs.

@guardboi guardboi changed the title Client.on_error() improvement with new parameter feat: Client.on_error() improvement with new parameter Feb 26, 2023
@plun1331 plun1331 changed the title feat: Client.on_error() improvement with new parameter feat!: Client.on_error() improvement with new parameter Feb 26, 2023
@plun1331 plun1331 added the feature Implements a feature label Feb 26, 2023
@plun1331
Copy link
Member

This is a breaking change

guardboi and others added 3 commits February 26, 2023 09:12
didnt give me an error in testing, reverting

Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
Co-authored-by: Om <92863779+Om1609@users.noreply.github.com>
Signed-off-by: Guard Boi <105892653+mariohero24@users.noreply.github.com>
@plun1331 plun1331 added the status: awaiting review Awaiting review from a maintainer label Apr 3, 2023
@pullapprove4 pullapprove4 bot requested a review from CodeWithSwastik April 18, 2023 16:08
@Lulalaby Lulalaby requested review from BobDotCom, Lulalaby and Middledot and removed request for CodeWithSwastik May 8, 2023 15:32
@pullapprove4
Copy link

pullapprove4 bot commented May 30, 2023

This pull request is in the In review step of the Default workflow.

The following review teams are pending:

@Lulalaby Lulalaby enabled auto-merge (squash) May 30, 2023 22:56
@Lulalaby Lulalaby merged commit 7f192fe into Pycord-Development:master May 31, 2023
@OmLanke
Copy link
Contributor

OmLanke commented Jun 4, 2023

Changelog entry is in the wrong section

@plun1331
Copy link
Member

plun1331 commented Jun 5, 2023

Changelog entry is in the wrong section

Fix it then :)

@OmLanke
Copy link
Contributor

OmLanke commented Jun 5, 2023

I'm lazy #2092 did it

plun1331 added a commit that referenced this pull request Jun 7, 2023
@plun1331 plun1331 mentioned this pull request Jun 7, 2023
9 tasks
Lulalaby pushed a commit that referenced this pull request Jun 7, 2023
* Revert "feat!: Client.on_error() improvement with new parameter (#1945)"

This reverts commit 7f192fe.

* chore: remove changelog entry of reverted pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Implements a feature status: awaiting review Awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants