-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Checks: fix flake8 E741 remainder #3928
base: main
Are you sure you want to change the base?
Conversation
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 have two questions in two files, all the others are fine as is with me.
def getmaprow_CELL(fd, buf, row, l): | ||
def getmaprow_CELL(fd, buf, row): |
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.
Does this affect compatibility with the C-libraries or its Python wrappers (like ctypes)
Who can answer this?
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 the only point that needs to be answered by someone else
scripts/db.univar/db.univar.py
Outdated
@@ -313,23 +313,23 @@ def main(): | |||
pval[i] = 0 | |||
|
|||
inf = open(tmp + ".sort") | |||
l = 1 | |||
ln = 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.
Is there a better name for this one? What was the reasoning for it (does it come from a formula or something)?
I'm reading it like the natural logarithm (ln), like in maths, but doesn't make sense.
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.
The "line_number" is what I meant. The logarithm didn't occur to me, but you're right. Would "line_number" or "counter" make sense?
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.
line_number sounds better than counter for me.
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.
Also, a note for other readers: I don't know if this part of code is critical or not, but that loop and double loop is probably quite inefficient. Probably doing a "in" check (with a pre-created local tuple) once per loop, and in the 4+pops times it matches, then find the correct assignment.
It's not something to do with this PR.
Reminder of E741 fixes for the "locale", "python", and "scripts" directories. The majority of fixes involved renaming variable names in iterables. The "noqa: E741" was added to "scripts/d.rast.leg/d.rast.leg.py" since it didn't make sense to change just the "l".