-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
LGTM code quality suggestions #588
Conversation
Hello @nshea3! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
Thanks @nshea3 , we appreciate the contribution! Actually my preference is that all of those I'll let the maintainers (@mmcky and @oyamad) weigh in as well. |
Hi @mmcky ! No worries! Happy to merge this in for the time being or close without merging, whichever seems best to you and @jstac |
thanks @nshea3 -- Thanks for looking into the Once an issue is open I will go ahead and merge these improvements and then we can loop back around with |
thanks @nshea3 for these changes in code quality. Greatly appreciated. |
Hi all!
This PR addresses the code quality alerts in #466
Three different things that LGTM picked up in the repo:
import *
in quantecon/game_theory/init.py. This one was a relatively straightforward fix, just updated with the specific imports required.import numpy as np
followed byfrom numpy import dot
etc. which is pretty reasonable especially with big formulas with lots of linear algebra. I see two possible approaches here:dot(A,B)
calls withnp.dot(A,B)
dot(A,B)
calls withA.dot(B)
For completeness here I defaulted to the first approach since it's a one-to-one drop in replacement and won't require any significant rewrites. However it does not help with readability or brevity, so I can certainly drop those commits from the PR if need be.
Happy to give the second approach a try as well.
LGTM list for reference: https://lgtm.com/projects/g/QuantEcon/QuantEcon.py/alerts?mode=list
Looking forward to your feedback on this! Thanks,
Nick