Closed magsol closed 8 years ago
@magsol Actually I tried to apply it in all code, but still in some small parts linter gives the warning, would you please check it and let me know why it's not yet fixed ? Thanks again for reviewing such useful points.
Unfortunately there are more fixes here.
=
sign, e.g. type=float
should be type = float
.op_VCTl2diff
but the very next line is the definition of op_getResidual
; there should be a blank line in between these two (helps readability).Parameters
. This is present in op_VCTl2diff
but not in op_selectTopR
.Parameters
and the Returns
header in the docstring. All the functions are missing this.----
underlining a header in the docstring should be exactly the same width as the word they underline; there are two many dashes under both Returns
headers.return
statements for the functions enclose single arguments in parenthesis, e.g. return (idxs_n)
. Parentheses are not needed unless there are multiple return values; please remove them.S[[i], [j]]
can simply be S[i, j]
.Thanks for such valuable pieces of advice. I done it, but just for item 1, when I'm spacing before and after operations ( like type=float ----> type = float) the small boxes around those lines are appeared again in sublime. It seems that the linter again starts to give warning. Again I'm not sure about my IDE and maybe it's a bug in win version of Sublime text 3.
That may correspond to one of the error codes that should be ignored. I posted a ticket with the error codes you should add to the ignore list in the configuration for SublimeLinter. If it's still showing up, I'll double check in case I missed one.
iPhone'd
On Dec 4, 2015, at 15:22, MOJTABAFA notifications@github.com wrote:
Thanks for such valuable pieces of advice. I done it, but just for item 1, when I'm spacing before and after operations ( like type=float ----> type = float) the small boxes around those line are appeared again in sublime. It seems that the linter again starts to give warning. Again I'm not sure about my IDE and maybe it's a bug in win version of Sublime text 3.
— Reply to this email directly or view it on GitHub.
A couple more small fixes:
def main():
that should be deleted.*
operator.Thanks and sorry about forgetting that two modifications . those are applied now !
Another few:
=
in np.copyto
.=
in np.savetxt
.It's applied , Thanks!
Small edits:
P
, T
, or R
v_sparce
is misspelled; should be v_sparse
Larger edits:
op_getResidual
, P
and R
are extraneous arguments that can be removed entirely. P
is already the length of the vector v
and can be accessed through v.shape[0]
, and R
is the length of idxs_n
and can be accessed through idxs_n.shape[0]
.v_sparse[idxs_n] = v[idxs_n]
.v.shape[0]
as the length of the array.Thanks , the modifications have been applied on code.
A few more:
S
in the op_getResidual
function.applied. thanks.
As I remember , previously you told me that between "parameters and previous line should be a space" ( 3 posts earlier in the current issue) so lines 9, 17 and 32 should be remained ?
They should be blank lines, yes. My point is that they should not have any trailing whitespace.
What I mean by that: somehow, on those three lines, you didn't type anything, but you did hit the spacebar a few times before hitting "enter". Thus, the line is blank (no text), but there are trailing spaces. These need to be deleted.
They should show up in your Sublime editor. It should look like this:
There should be blank lines, but there should NOT be trailing whitespace.
Ok, Thanks got it now.
There are many lines in the file that have trailing spaces (extra space characters at the end of a line), as well as spaces between characters that should be deleted (between an opening parenthesis
(
and the argument of a function).For example:
has extra spaces between the parentheses and the argument names. The correct version should be:
There should, however, be spaces between operators (such as
+
,-
,*
,/
,=
, and,
).For example:
is incorrect, as there are no spaces between the operator
+
and the operands, or any spaces after the commas. The correct version should be: