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

Added error handling for Nvidia GPU, fixed some pylint errors #4

Merged
merged 21 commits into from
Jul 31, 2023

Conversation

JeremiahPetersen
Copy link
Contributor

I added a few error handling options for Nvidia GPU, and fixed some pylint errors. (trailing whitespaces, missing doc string) I added # pylint: disable=line-too-long & # pylint: disable=C0103 so single letter variables and lines over 100 char will pass pylint. Let me know if you want to include these changes. I would like to get the pylint back to passing, as it was before my previous PR.

@JeremiahPetersen
Copy link
Contributor Author

I will continue work on this today to get pylint passing

@JeremiahPetersen
Copy link
Contributor Author

JeremiahPetersen commented Jul 29, 2023

Added pylint disable comments for line > 100 char, import error (winreg), single letter variables (C0103) & Catching too general exception (W0718)

"# pylint: disable=line-too-long, import-error"
"# pylint: disable=C0103, W0718"

Everything is functioning correctly on my end. Every once in a while I will get a terminal output of

[Running] python -u "c:\Users...\Desktop\SYSIG\sysig.py"
An error occurred: 0

I added an error handling block with traceback error to determine what this is, but was unable to determine. Happens 1 out of 10 times when running code. Code continues to run and functions correctly on all tabs. The error only appears at the beginning of running the script (10% of the time). No other terminal outputs occur while the code is running. I am unsure if this is only on my end.

@diamant3
Copy link
Owner

Thank you for fixing the pylint. I really appreciate it!

I just noticed that you disabled some pylint checks. Sorry, but I'm not a fan of disabling the pylint in the source code. Please remove it. I'll lower the pylint score in the workflow and merge it later. Thanks again!

@JeremiahPetersen
Copy link
Contributor Author

No worries at all! Let me know if you want anything else adjusted.

@diamant3
Copy link
Owner

Hi, I tried to lower the pylint score but it didn't fix

I suggest to do this following:

  • if method like dpg.add_text(), you can do like this:
dpg.add_text(
    arg1,
    arg2,
    arg3)
  • use a meaningful and snake_case style when naming a variable even when doing alias(as keyword)

search the pylint checks's name/number in https://pylint.readthedocs.io/en/latest/, they have correct code to implement, thanks!

@JeremiahPetersen
Copy link
Contributor Author

Ah, thanks for the feedback! I will work more on it in the next 48 hours and message when it is ready for review.

@JeremiahPetersen
Copy link
Contributor Author

I have cleaned up the graphics section and the code is ready for review. I think I got everything fixed in the graphics section, let me know if I missed anything!

@diamant3
Copy link
Owner

I have cleaned up the graphics section and the code is ready for review. I think I got everything fixed in the graphics section, let me know if I missed anything!

LGTM! I'll merge this later, thank you!

@diamant3 diamant3 merged commit 00006fb into diamant3:main Jul 31, 2023
8 checks passed
@diamant3
Copy link
Owner

Thanks!

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