Skip to content

Run black on the codebase#599

Merged
aaronayres35 merged 7 commits into
masterfrom
black-codebase
Apr 5, 2021
Merged

Run black on the codebase#599
aaronayres35 merged 7 commits into
masterfrom
black-codebase

Conversation

@aaronayres35
Copy link
Copy Markdown
Contributor

A first step towards having a flake8 clean codebase

commands run:

black chaco
black examples
black chaco -l 79
black examples -l 79

Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

I would have preferred it if the changes in this PR were actually in two separate PRs - one for the package and another for the examples.

@@ -725,5 +766,5 @@ def create_plot_types(names):
save_plot(window.container, fname)


if __name__ == '__main__':
if __name__ == "__main__":
main()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@aaronayres35 looks like there already is a script to generate the chaco demo plots?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like this script generates a plot for each plot type, not necessarily all the examples/demos (ie. not everything we show on the "gallerry"/"annotated examples" page). However, yes this is super useful and could likely be modified to regenerate all the demo plots

Comment on lines -28 to -29
lplot.overlays.append(LineInspector(component=lplot,
axis="value", write_metadata=True, is_listener=True, color="blue"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it looks like there was a copy-paste error here. and below too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can be handled in a separate PR

Comment thread examples/tutorials/scipy2008/custom_overlay_movetool.py
Comment thread examples/tutorials/scipy2008/connected_orientation.py
Comment thread examples/demo/advanced/asynchronous_updates.py Outdated
Comment thread examples/demo/advanced/spectrum.py Outdated
Comment thread examples/demo/vtk_example.py
Comment thread examples/demo/vtk/vtk_example.py
Comment thread examples/demo/vtk/spectrum.py
Comment thread examples/demo/vtk/cmap_scatter.py
Comment thread chaco/barplot.py Outdated
Comment thread chaco/tests/test_speedups.py
Comment thread chaco/tests/test_plot.py Outdated
Comment thread chaco/tests/test_image_utils.py Outdated
Comment thread chaco/tests/test_image_utils.py Outdated
Comment thread chaco/scales/tests/test_scales.py Outdated
Comment thread chaco/scales/tests/test_scales.py Outdated
Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM. @aaronayres35 let's have a chat monday morning before you merge this PR.

Comment thread chaco/colormap_generators.py
Comment thread chaco/contour/setup.py

config.add_extension('contour',['*.c'],**numerix_info)
config.add_data_dir('tests')
numerix_info = config.get_info("numerix")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i have no clue what numerix_info is but i suspect it's dead code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it doesn't looks like it is but im not what it does.

Comment thread chaco/contour_line_plot.py Outdated
Comment thread chaco/contour_poly_plot.py Outdated
Comment thread chaco/data_frame_plot_data.py Outdated
Comment thread chaco/multi_line_plot.py Outdated
Comment thread chaco/lineplot.py Outdated
Comment thread chaco/legend.py
"bounds_items",
"label_at_top",
):
self._layout_needed = True
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

here's another fun little trait which seems to have a trait change handler hooked up somewhere which redraws or something when it is set.

Comment thread chaco/layers/svg_range_selection_overlay.py Outdated
Comment thread chaco/layers/svg_range_selection_overlay.py Outdated
aaronayres35 and others added 4 commits April 5, 2021 05:47
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
@aaronayres35 aaronayres35 merged commit e9af395 into master Apr 5, 2021
@aaronayres35 aaronayres35 deleted the black-codebase branch April 5, 2021 15:04
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