-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
STY: PEP-8 Cleanup #1346
STY: PEP-8 Cleanup #1346
Conversation
merge, ignore or extend to larger cleanup. |
@@ -341,7 +341,7 @@ def q_stat(x,nobs, type="ljungbox"): | |||
ret = nobs*(nobs+2)*np.cumsum((1./(nobs-np.arange(1, | |||
len(x)+1)))*x**2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like there are a lot more missing spaces in this module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i'll give it a once over
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pep8 doesn't complain about this. should it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which pep8, the check script? or the newest version of the PEP?
we follow space around operators except power, the PEP does not anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strike that. It does now.
A little more comprehensive now. I ignored whitespace between arithmetic operators in indexing. It's a personal preference. |
@@ -790,7 +805,8 @@ def grangercausalitytests(x, maxlag, addconst=True, verbose=True): | |||
|
|||
if x.shape[0] <= 3 * maxlag + int(addconst): | |||
raise ValueError("Insufficient observations. Maximum allowable " | |||
"lag is {0}".format(int((x.shape[0] - int(addconst)) / 3) - 1)) | |||
"lag is {0}".format(int((x.shape[0] - int(addconst)) / | |||
3) - 1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intend to the matching opening bracket?
impossible to see where the 3 belongs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I had but flake8 complained. I agree it's better though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nm. Fixed.
for intend in continuation lines that isn't large enough. |
@@ -186,24 +191,24 @@ def adfuller(x, maxlag=None, regression="c", autolag='AIC', | |||
if regresults: | |||
store = True | |||
|
|||
trenddict = {None:'nc', 0:'c', 1:'ct', 2:'ctt'} | |||
trenddict = {None: 'nc', 0: 'c', 1: 'ct', 2: 'ctt'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that looks good,
the "stranger" thing was the space before the :
STY: PEP-8 Cleanup
What to do with one-line style fix commits?