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

Set up ruff & black with pre-commit and document usage #64

Merged
merged 6 commits into from
May 22, 2023

Conversation

mfisher87
Copy link
Collaborator

No description provided.

@mfisher87 mfisher87 requested a review from stefanv May 21, 2023 14:55
# import matplotlib as mpl
# from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
# from matplotlib.backends.qt_compat import QtCore, QtGui
#
# def test_editor_add_point():
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pulled all the imports associated with this commented block into the commented block. Any reason to keep this function though?

viscm/gui.py Outdated Show resolved Hide resolved
@mfisher87 mfisher87 force-pushed the code-autoformatting branch 2 times, most recently from 9b8bb41 to 9fbf269 Compare May 21, 2023 18:24
@mfisher87 mfisher87 changed the title Set up flake8, black, isort with pre-commit and document usage Set up ruff & black with pre-commit and document usage May 21, 2023
@mfisher87 mfisher87 changed the title Set up ruff & black with pre-commit and document usage Set up ruff & black with pre-commit and document usage May 21, 2023
f.read(),
os.path.basename(args.colormap), # noqa: F821
"exec",
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The FIXME above and noqa comments document a bug found by ruff. Will get back to this when I'm ready to dig into the python loading behavior and build a unit test :)

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
tests.py Show resolved Hide resolved
@stefanv
Copy link
Contributor

stefanv commented May 21, 2023

With the pre-commit instructions, should we mention how to install it?

@mfisher87
Copy link
Collaborator Author

With the pre-commit instructions, should we mention how to install it?

I think since we link to the docs, people should be able to figure it out. But I don't feel strongly, so happy to add that in if you'd like!

@stefanv stefanv merged commit 2ff0668 into matplotlib:main May 22, 2023
@mfisher87 mfisher87 deleted the code-autoformatting branch May 22, 2023 14:16
@mfisher87 mfisher87 added this to the v0.10 milestone Jun 11, 2023
@mfisher87 mfisher87 added the ci label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants