Skip to content
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

Run black on the codebase #599

Merged
merged 7 commits into from
Apr 5, 2021
Merged

Run black on the codebase #599

merged 7 commits into from
Apr 5, 2021

Conversation

aaronayres35
Copy link
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
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
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
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
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
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

examples/demo/advanced/asynchronous_updates.py Outdated Show resolved Hide resolved
examples/demo/advanced/spectrum.py Outdated Show resolved Hide resolved
examples/demo/vtk_example.py Show resolved Hide resolved
examples/demo/vtk/vtk_example.py Show resolved Hide resolved
examples/demo/vtk/spectrum.py Show resolved Hide resolved
examples/demo/vtk/cmap_scatter.py Show resolved Hide resolved
chaco/barplot.py Outdated Show resolved Hide resolved
chaco/tests/test_speedups.py Show resolved Hide resolved
chaco/tests/test_plot.py Outdated Show resolved Hide resolved
chaco/tests/test_image_utils.py Outdated Show resolved Hide resolved
chaco/tests/test_image_utils.py Outdated Show resolved Hide resolved
chaco/scales/tests/test_scales.py Outdated Show resolved Hide resolved
chaco/scales/tests/test_scales.py Outdated Show resolved Hide resolved
Copy link
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.

chaco/colormap_generators.py Show resolved Hide resolved

config.add_extension('contour',['*.c'],**numerix_info)
config.add_data_dir('tests')
numerix_info = config.get_info("numerix")
Copy link
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
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.

chaco/contour_line_plot.py Outdated Show resolved Hide resolved
chaco/contour_poly_plot.py Outdated Show resolved Hide resolved
chaco/data_frame_plot_data.py Outdated Show resolved Hide resolved
chaco/multi_line_plot.py Outdated Show resolved Hide resolved
chaco/lineplot.py Outdated Show resolved Hide resolved
"bounds",
"bounds_items",
"label_at_top",
):
self._layout_needed = True
Copy link
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.

chaco/layers/svg_range_selection_overlay.py Outdated Show resolved Hide resolved
chaco/layers/svg_range_selection_overlay.py Outdated Show resolved Hide resolved
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