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
Removed unused/unneeded "from matplotlib import pyplot" #7
Conversation
@@ -25,7 +25,6 @@ | |||
import collections | |||
import numpy | |||
import copy | |||
from matplotlib import pyplot | |||
import matplotlib.colors | |||
import mpl_toolkits.mplot3d |
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.
I think this one is unused as well... pylint
lists 5 useless imports.
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.
The mpl_toolkits.mplot3d
import actually needs to be moved to optimizerDisplay.py
, where the projection='3d'
argument to add_subplot
requires that module to have been imported (I can see how that would confuse a linter). Looks like I forgot to move the import when I refactored this code at some point.
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.
Actually, it looks like import matplotlib.colors
should go in optimizerDisplay.py
as well.
c42d471
to
04977ea
Compare
@TallJimbo I've moved the other imports as discussed in the PR. @wmwv Looking at |
@timj Then perhaps the import could just be done within plotDistribution. |
I've put in the deferred loading. I'm fine with that although I seem to recall there wasn't consensus on whether this was a good thing or not. I think the patches are close enough that @TallJimbo can have a final review. |
Did this functionality ever get merged? |
Only one function in interactive.py uses matplotlib so load matplotlib when that function is called.
Passes buildbot
http://lsst-buildx.ncsa.illinois.edu:8010/builders/DM_stack/builds/5664
This is just a trivial removal of two unused "from matplotlib import pyplot" lines.
No need for consideration of the discussion at
https://jira.lsstcorp.org/browse/DM-2588