Skip to content

Commit

Permalink
fix for python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Mar 16, 2018
1 parent 12046f6 commit 30bace0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pygsp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@
# Users only call the plot methods from the objects.
# It's thus more convenient for them to have the doc there.
# But it's more convenient for developers to have the doc alongside the code.
filters.Filter.plot.__doc__ = plotting._plot_filter.__doc__
graphs.Graph.plot.__doc__ = plotting._plot_graph.__doc__
graphs.Graph.plot_signal.__doc__ = plotting._plot_signal.__doc__
graphs.Graph.plot_spectrogram.__doc__ = plotting._plot_spectrogram.__doc__
try:
filters.Filter.plot.__doc__ = plotting._plot_filter.__doc__
graphs.Graph.plot.__doc__ = plotting._plot_graph.__doc__
graphs.Graph.plot_signal.__doc__ = plotting._plot_signal.__doc__
graphs.Graph.plot_spectrogram.__doc__ = plotting._plot_spectrogram.__doc__
except AttributeError:
# For Python 2.7.
filters.Filter.plot.__func__.__doc__ = plotting._plot_filter.__doc__
graphs.Graph.plot.__func__.__doc__ = plotting._plot_graph.__doc__
graphs.Graph.plot_signal.__func__.__doc__ = plotting._plot_signal.__doc__
graphs.Graph.plot_spectrogram.__func__.__doc__ = plotting._plot_spectrogram.__doc__

__version__ = '0.5.1'
__release_date__ = '2017-12-15'

0 comments on commit 30bace0

Please sign in to comment.