Skip to content

STY: PEP8/PyFlakes #337

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

Merged
merged 3 commits into from
Aug 11, 2015
Merged

STY: PEP8/PyFlakes #337

merged 3 commits into from
Aug 11, 2015

Conversation

effigies
Copy link
Member

@effigies effigies commented Aug 5, 2015

This is a fairly comprehensive style cleanup to meet PEP8 and pyflakes suggestions throughout the non-test code. Tests pass locally, but submitting for CI testing.

Almost all changes are spacing issues. There are a couple variables that are removed when being assigned to values or functions known not to have side effects. Not all suggestions were incorporated, particularly when a style seemed to be intentional and consistent.

# and then give up. At this stage we're expecting exotic longdouble or their
# complex equivalent.
# and then give up. At this stage we're expecting exotic longdouble or
# their complex equivalent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space !

@@ -561,7 +564,8 @@ def optimize_read_slicers(sliceobj, in_shape, itemsize, heuristic):


def slicers2segments(read_slicers, in_shape, offset, itemsize):
""" Get segments from `read_slicers` given input `in_shape` and memory steps
""" Get segments from `read_slicers` given input `in_shape` and memory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be one line to match match numpy docstring standard.

Maybe Get segments fromread_slicersgivenin_shapeand memory steps ?

@effigies
Copy link
Member Author

Left as new commits so you can see the changes. Will rebase into original 3 when it's ready to go.

@@ -1345,7 +1346,8 @@ def _ftype4scaled_finite(tst_arr, slope, inter, direction='read',


def finite_range(arr, check_nan=False):
''' Return range (min, max) or range and flag (min, max, has_nan) from `arr`
''' Return range (min, max) or range and flag (min, max, has_nan) from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be on single line for numpy docstring standard. Maybe Get range (min, max) or range and flag (min, max, has_nan) from arr``

@matthew-brett
Copy link
Member

Thanks for doing this. I sense a lots of rebases in the air...

@matthew-brett
Copy link
Member

Thanks for this - ready to go - squash and merge when ready.

@effigies
Copy link
Member Author

Rebased against master and tests run clean locally.

matthew-brett added a commit that referenced this pull request Aug 11, 2015
MRG: PEP8/PyFlakes

Big PEP8 clean up, let's hope we don't have to another one of these for a while.
@matthew-brett matthew-brett merged commit e471f8c into nipy:master Aug 11, 2015
@matthew-brett
Copy link
Member

Thanks for this - very helpful.

@effigies
Copy link
Member Author

Ugh. Just noticed a typo (s/intO/into/). Probably not worth another PR if you just want to drop a quick commit.

@effigies effigies deleted the linting branch August 11, 2015 20:48
@matthew-brett
Copy link
Member

Thanks - fixed I think.

@effigies effigies mentioned this pull request Nov 6, 2015
grlee77 pushed a commit to grlee77/nibabel that referenced this pull request Mar 15, 2016
MRG: PEP8/PyFlakes

Big PEP8 clean up, let's hope we don't have to another one of these for a while.
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