-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use flake8 #93
Merged
Merged
Use flake8 #93
Conversation
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
As the tests make use of flake8 (specifically a pytest plugin for flake8), require `flake8` and `pytest-flake8`.
Uses the flake8 plugin for pytest to ensure that flake8 checks are run as part of pytest.
These imports were probably used for code that no longer needs them. So go ahead and drop these unused imports.
Running flake8 picked out this line as too long. This wraps it some to try and fix this issue.
To fit the 79 character limit constraint, split this warning into two strings on two lines that are concatenated.
Some internal imports are unused according to flake8. So we drop them here to fix these flake8 errors.
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.
Make sure that all imports in `ndfilters` happen before other statements to fix flake8 errors.
We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines.
Removes the need for the `\`, which seems to be causing issues with `flake8`.
For some reason disabling this flake8 error on the second line is not sufficient. So disable it on the first lines as well.
This `noqa` seems to have no effect. So just drop it to avoid having these in excess.
As flake8 complains the line length is too long here, wrap these arguments to fit them within the recommended line length.
To fit the recommended line length, wrap the test function's parameterized arguments.
We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines.
As flake8 complains the line length is too long here, wrap these arguments to fit them within the recommended line length.
As flake8 complains the line length is too long here, wrap these arguments to fit them within the recommended line length.
We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines.
We are not really interested in flake8's `lambda` assignment rule in these cases. So simply tell flake8 to ignore these lines.
As the `operator` module is not being used in this test module, drop it from the imports.
These are a little annoying to wrap currently. So simply tell flake8 to not worry about these.
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.
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.
As flake8 did not like how this line was formatted, we simplify it a bit and adjust the indentation to make it happier.
As flake8 did not like how this line was formatted, we simplify it a bit and adjust the indentation to make it happier.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the test suite to use flake8 to lint the code as part of the pytest run. Also fixes several errors caught by running flake8.