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

Stricter signature for ErrorHandler.gui_error() #6846

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

kozlovsky
Copy link
Contributor

The current signature of the gui_error function is not strict enough. In practice, the function is always called with three arguments. Because of insufficient checks, inside the gui_eror function, PyCharm shows warnings "local variable might be referenced before assignment". This PR fixes PyCharm warnings and makes variable names for the exception and the exception type more "traditional".

Also, the PR uses the caplog pytest fixture to check log messages in tests.

@kozlovsky
Copy link
Contributor Author

retest this please

@kozlovsky
Copy link
Contributor Author

retest this please

1 similar comment
@kozlovsky
Copy link
Contributor Author

retest this please

@kozlovsky kozlovsky marked this pull request as ready for review April 6, 2022 15:52
@kozlovsky kozlovsky requested review from a team and drew2a and removed request for a team April 6, 2022 15:52
drew2a
drew2a previously approved these changes Apr 6, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@kozlovsky
Copy link
Contributor Author

retest this please

1 similar comment
@kozlovsky
Copy link
Contributor Author

retest this please

@kozlovsky kozlovsky marked this pull request as draft April 11, 2022 06:59
@drew2a drew2a force-pushed the main branch 2 times, most recently from a8c07e5 to 5540c4f Compare April 14, 2022 14:39
@drew2a drew2a force-pushed the main branch 2 times, most recently from 2370caf to 21168b4 Compare June 23, 2022 11:54
@kozlovsky kozlovsky marked this pull request as ready for review September 9, 2022 15:08
@kozlovsky kozlovsky merged commit fb6536f into Tribler:main Sep 12, 2022
@kozlovsky kozlovsky deleted the fix/gui_error_signature branch September 12, 2022 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants