-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Require flake8 be installed on CI * Require `flake8` and `pytest-flake8` for testing As the tests make use of flake8 (specifically a pytest plugin for flake8), require `flake8` and `pytest-flake8`. * Ensure flake8 is run with pytest Uses the flake8 plugin for pytest to ensure that flake8 checks are run as part of pytest. * Exclude versioneer and docs from flake8 * Drop unused external imports caught by flake8 These imports were probably used for code that no longer needs them. So go ahead and drop these unused imports. * Wrap long warning line Running flake8 picked out this line as too long. This wraps it some to try and fix this issue. * Break up warning string across multiple lines To fit the 79 character limit constraint, split this warning into two strings on two lines that are concatenated. * Drop some internal unused imports Some internal imports are unused according to flake8. So we drop them here to fix these flake8 errors. * Avoid flake8 unused import error To workaround flake8 unused import errors where we know these functions are imported and used elsewhere, go ahead and perform trivial assignments to make use of these functions. This still passes the tests and removes the flake8 errors. * Reorder imports in ndfilters Make sure that all imports in `ndfilters` happen before other statements to fix flake8 errors. * Ignore `lambda` assignment with flake8 We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines. * Adjust line wrapping of `lambda` Removes the need for the `\`, which seems to be causing issues with `flake8`. * Disable the flake8 lambda assignment on both lines For some reason disabling this flake8 error on the second line is not sufficient. So disable it on the first lines as well. * Drop flake8 noqa from second `lambda` line This `noqa` seems to have no effect. So just drop it to avoid having these in excess. * Remove whitespace before `:` for flake8 * Have flake8 ignore `lambda` assignment * Wrap parameterized arguments As flake8 complains the line length is too long here, wrap these arguments to fit them within the recommended line length. * Wrap test parameterized arguments To fit the recommended line length, wrap the test function's parameterized arguments. * Ignore `lambda` assignment with flake8 We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines. * Wrap parameterized arguments As flake8 complains the line length is too long here, wrap these arguments to fit them within the recommended line length. * Wrap parameterized arguments As flake8 complains the line length is too long here, wrap these arguments to fit them within the recommended line length. * Ignore `lambda` assignment with flake8 We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines. * Trim whitespace before `:` in `lambda` for flake8 * Ignore `lambda` assignment with flake8 We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines. * Drop extra blank line * Compare `str`s with `==`s instead of `is` * Drop unused import As the `operator` module is not being used in this test module, drop it from the imports. * Allow a couple of long lines These are a little annoying to wrap currently. So simply tell flake8 to not worry about these. * Require flake8 and pytest plugin on Python 3.5 As Python 3.5 is not supported in conda-forge any more, this uses the slightly older versions of packages that work with Python 3.5 in order to run the flake8 tests there as well. * Switch to `[tool:pytest]` in `setup.cfg` As the `[pytest]` section in `setup.cfg` seems to be deprecated and raises errors when used with newer pytest versions, switch to using `[tool:pytest]` instead. This seems to work ok even with old versions of pytest used with Python 3.5. * Cleanup SciPy check in `test_fourier_filter_type` As flake8 did not like how this line was formatted, we simplify it a bit and adjust the indentation to make it happier. * Cleanup SciPy check in `test_measure_props` As flake8 did not like how this line was formatted, we simplify it a bit and adjust the indentation to make it happier.
- Loading branch information
Showing
35 changed files
with
119 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
import numbers | ||
|
||
import scipy.ndimage.filters | ||
|
||
from . import _utils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
import numbers | ||
|
||
import numpy | ||
import scipy.ndimage.filters | ||
|
||
from . import _utils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
import numbers | ||
|
||
import numpy | ||
import scipy.ndimage.filters | ||
|
||
from . import _utils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
import numpy | ||
|
||
import dask.array | ||
|
||
from . import _utils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.