-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Enable flake8 and re-enable it everywhere #11477
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cac3be2
Run flake8 instead of pep8 on Python 3.6
5e859f8
Fix undefined names.
QuLogic cdcb282
STY: Fix some whitespace issues.
QuLogic 34d8eb2
Use raw strings to avoid invalid escape sequences.
QuLogic 99a6b8a
STY: Use consistent (class)method parameter names.
QuLogic d09bfdf
STY: Fix N813 camelcase imported as lowercase.
QuLogic 6123369
TST: Run flake8 outside of pytest.
QuLogic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,112 @@ | ||
[flake8] | ||
ignore = | ||
# Normal default | ||
E121,E123,E126,E226,E24,E704,W503,W504, | ||
# Additional ignores: | ||
E111, E114, E115, E116, E122, E124, E125, E127, E128, E129, E131, | ||
E265, E266, | ||
E305, E306, | ||
E722, E741, | ||
F401, F403, F811, F841, | ||
# Some new flake8 ignores: | ||
N801, N802, N803, N806, N812, | ||
|
||
exclude = | ||
.git | ||
build | ||
# External files. | ||
versioneer.py | ||
tools/gh_api.py | ||
tools/github_stats.py | ||
|
||
per-file-ignores = | ||
setup.py: E402 | ||
setupext.py: E302, E501 | ||
|
||
tools/compare_backend_driver_results.py: E501 | ||
tools/subset.py: E221, E231, E251, E261, E302, E501, E701 | ||
|
||
matplotlib/_cm.py: E202, E203 | ||
matplotlib/_mathtext_data.py: E203, E261 | ||
matplotlib/backend_bases.py: E225 | ||
matplotlib/backends/_backend_tk.py: E203, E222, E225, E231, E271, E301, E303, E401, E501, E701 | ||
matplotlib/backends/backend_agg.py: E261, E302, E303, E701 | ||
matplotlib/backends/backend_cairo.py: E203, E221, E261, E303, E402, E711 | ||
matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E261, E501 | ||
matplotlib/backends/backend_macosx.py: E231, E261 | ||
matplotlib/backends/backend_pgf.py: E303, E731 | ||
matplotlib/backends/backend_ps.py: E203, E225, E228, E231, E261, E262, E302, E303, E501, E701 | ||
matplotlib/backends/backend_svg.py: E203, E225, E228, E231, E261, E302, E501 | ||
matplotlib/backends/qt_editor/formlayout.py: E301, E501 | ||
matplotlib/backends/tkagg.py: E231, E302, E701 | ||
matplotlib/backends/windowing.py: E301, E302 | ||
matplotlib/font_manager.py: E203, E221, E225, E251, E261, E262, E302, E501 | ||
matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225, E302 | ||
matplotlib/legend_handler.py: E201, E501 | ||
matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E231, E251, E261, E301, E302, E303, E402, E501 | ||
matplotlib/patheffects.py: E231 | ||
matplotlib/projections/geo.py: E203, E221, E231, E261, E502 | ||
matplotlib/pylab.py: E501 | ||
matplotlib/pyplot.py: E201, E202, E221, E222, E225, E231, E251, E261, E302, E501, E701 | ||
matplotlib/rcsetup.py: E203, E225, E261, E302, E501 | ||
matplotlib/sphinxext/mathmpl.py: E302 | ||
matplotlib/sphinxext/only_directives.py: E302 | ||
matplotlib/sphinxext/plot_directive.py: E261, E302, E402 | ||
matplotlib/tests/test_image.py: E225, E231, E251, E302, E501 | ||
matplotlib/tests/test_lines.py: E231, E261 | ||
matplotlib/tests/test_mathtext.py: E261, E501 | ||
matplotlib/transforms.py: E201, E202, E203, E501 | ||
matplotlib/tri/triinterpolate.py: E201, E221 | ||
matplotlib/type1font.py: E731 | ||
|
||
mpl_toolkits/__init__.py: E261 | ||
mpl_toolkits/axes_grid/axes_divider.py: E501 | ||
mpl_toolkits/axes_grid/axes_rgb.py: E302, E501 | ||
mpl_toolkits/axes_grid1/axes_divider.py: E402, E501 | ||
mpl_toolkits/axes_grid1/axes_grid.py: E225 | ||
mpl_toolkits/axes_grid1/axes_rgb.py: E231 | ||
mpl_toolkits/axes_grid1/axes_size.py: E261, E501 | ||
mpl_toolkits/axes_grid1/colorbar.py: E225, E231, E261, E262, E302, E303, E501, E701 | ||
mpl_toolkits/axes_grid1/inset_locator.py: E501 | ||
mpl_toolkits/axes_grid1/mpl_axes.py: E303, E501 | ||
mpl_toolkits/axes_grid1/parasite_axes.py: E225, E231, E302, E303, E501 | ||
mpl_toolkits/axisartist/angle_helper.py: E201, E203, E221, E222, E225, E231, E251, E261, E262, E302, E303, E501 | ||
mpl_toolkits/axisartist/axis_artist.py: E201, E202, E221, E225, E228, E231, E251, E261, E262, E302, E303, E402, E501, E701, E711 | ||
mpl_toolkits/axisartist/axisline_style.py: E231, E261, E262, E302, E303 | ||
mpl_toolkits/axisartist/axislines.py: E225, E231, E261, E303, E501 | ||
mpl_toolkits/axisartist/clip_path.py: E225, E302, E303, E501 | ||
mpl_toolkits/axisartist/floating_axes.py: E225, E231, E261, E262, E302, E303, E402, E501 | ||
mpl_toolkits/axisartist/grid_finder.py: E231, E261, E302, E303, E402 | ||
mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E231, E261, E262, E271, E302, E303, E501 | ||
mpl_toolkits/mplot3d/art3d.py: E203, E222, E225, E231 | ||
mpl_toolkits/mplot3d/axes3d.py: E203, E231, E303, E402, E501, E701 | ||
mpl_toolkits/mplot3d/axis3d.py: E231, E302 | ||
mpl_toolkits/mplot3d/proj3d.py: E231, E302, E303 | ||
mpl_toolkits/tests/test_axes_grid1.py: E201, E202 | ||
mpl_toolkits/tests/test_mplot3d.py: E231, E302 | ||
|
||
doc/**: E302, E501 | ||
doc/conf.py: E402 | ||
tutorials/**: E402, E501 | ||
|
||
examples/**: E501, E402 | ||
examples/images_contours_and_fields/tricontour_demo.py: E201 | ||
examples/images_contours_and_fields/tripcolor_demo.py: E201 | ||
examples/images_contours_and_fields/triplot_demo.py: E201 | ||
examples/misc/table_demo.py: E201 | ||
examples/pyplots/annotate_transform.py: E228, E251 | ||
examples/pyplots/annotation_polar.py: E231 | ||
examples/pyplots/auto_subplots_adjust.py: E231, E261, E302 | ||
examples/pyplots/boxplot_demo_pyplot.py: E231 | ||
examples/pyplots/compound_path_demo.py: E231 | ||
examples/pyplots/fig_axes_customize_simple.py: E261 | ||
examples/pyplots/pyplot_formatstr.py: E231 | ||
examples/pyplots/pyplot_mathtext.py: E231 | ||
examples/pyplots/pyplot_simple.py: E231 | ||
examples/pyplots/pyplot_two_subplots.py: E302 | ||
examples/pyplots/text_commands.py: E231 | ||
examples/pyplots/text_layout.py: E231 | ||
examples/pyplots/whats_new_98_4_fancy.py: E225, E261, E302 | ||
examples/pyplots/whats_new_98_4_fill_between.py: E225 | ||
examples/pyplots/whats_new_98_4_legend.py: E228 | ||
examples/pyplots/whats_new_99_spines.py: E231, E261 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
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.
This is used as a meta-class so I ma not sure that this change is correct (I am also not sure off the top of my head what
self
is in this case and when this__init__
gets called).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.
It may be that the object is a class/type here, but it's still an instance at this point, so I'm not sure calling it something other than
self
is warranted.