Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Properly set and inherit backend_version.#24197

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 1 commit intomatplotlib:mainfromanntzer:bv
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletionslib/matplotlib/backends/_backend_gtk.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,12 +24,7 @@
raise ImportError("Gtk-based backends require cairo") from e

_log = logging.getLogger(__name__)

backend_version = "%s.%s.%s" % (
Gtk.get_major_version(), Gtk.get_minor_version(), Gtk.get_micro_version())

# Placeholder
_application = None
_application = None # Placeholder


def _shutdown_application(app):
Expand DownExpand Up@@ -305,6 +300,12 @@ def trigger(self, *args):


class _BackendGTK(_Backend):
backend_version = "%s.%s.%s" % (
Gtk.get_major_version(),
Gtk.get_minor_version(),
Gtk.get_micro_version(),
)

@staticmethod
def mainloop():
global _application
Expand Down
4 changes: 1 addition & 3 deletionslib/matplotlib/backends/_backend_tk.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,9 +24,6 @@


_log = logging.getLogger(__name__)

backend_version = tk.TkVersion

cursord = {
cursors.MOVE: "fleur",
cursors.HAND: "hand2",
Expand DownExpand Up@@ -1017,6 +1014,7 @@ def trigger(self, *args):

@_Backend.export
class _BackendTk(_Backend):
backend_version = tk.TkVersion
FigureManager = FigureManagerTk

@staticmethod
Expand Down
4 changes: 1 addition & 3 deletionslib/matplotlib/backends/backend_agg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,9 +40,6 @@
from matplotlib.backends._backend_agg import RendererAgg as _RendererAgg


backend_version = 'v2.2'


def get_hinting_flag():
mapping = {
'default': LOAD_DEFAULT,
Expand DownExpand Up@@ -563,5 +560,6 @@ def print_webp(self, filename_or_obj, *, pil_kwargs=None):

@_Backend.export
class _BackendAgg(_Backend):
backend_version = 'v2.2'
FigureCanvas = FigureCanvasAgg
FigureManager = FigureManagerBase
4 changes: 1 addition & 3 deletionslib/matplotlib/backends/backend_cairo.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,9 +34,6 @@
from matplotlib.transforms import Affine2D


backend_version = cairo.version


def _append_path(ctx, path, transform, clip=None):
for points, code in path.iter_segments(
transform, remove_nans=True, clip=clip):
Expand DownExpand Up@@ -548,5 +545,6 @@ def set_context(self, ctx):

@_Backend.export
class _BackendCairo(_Backend):
backend_version = cairo.version
FigureCanvas = FigureCanvasCairo
FigureManager = FigureManagerBase
1 change: 0 additions & 1 deletionlib/matplotlib/backends/backend_gtk3.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,6 @@
_BackendGTK, _FigureManagerGTK, _NavigationToolbar2GTK,
TimerGTK as TimerGTK3,
)
from ._backend_gtk import backend_version # noqa: F401 # pylint: disable=W0611


_log = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletionlib/matplotlib/backends/backend_gtk4.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,6 @@
_BackendGTK, _FigureManagerGTK, _NavigationToolbar2GTK,
TimerGTK as TimerGTK4,
)
from ._backend_gtk import backend_version # noqa: F401 # pylint: disable=W0611


class FigureCanvasGTK4(FigureCanvasBase, Gtk.DrawingArea):
Expand Down
4 changes: 2 additions & 2 deletionslib/matplotlib/backends/backend_ps.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,9 +33,8 @@
from matplotlib.backends.backend_mixed import MixedModeRenderer
from . import _backend_pdf_ps

_log = logging.getLogger(__name__)

backend_version ='Level II'
_log =logging.getLogger(__name__)
debugPS = False


Expand DownExpand Up@@ -1364,4 +1363,5 @@ def pstoeps(tmpfile, bbox=None, rotated=False):

@_Backend.export
class _BackendPS(_Backend):
backend_version = 'Level II'
FigureCanvas = FigureCanvasPS
3 changes: 1 addition & 2 deletionslib/matplotlib/backends/backend_qt.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,6 @@
)


backend_version = __version__

# SPECIAL_KEYS are Qt::Key that do *not* return their Unicode name
# instead they have manually specified names.
SPECIAL_KEYS = {
Expand DownExpand Up@@ -1013,6 +1011,7 @@ def trigger(self, *args, **kwargs):

@_Backend.export
class _BackendQT(_Backend):
backend_version = __version__
FigureCanvas = FigureCanvasQT
FigureManager = FigureManagerQT

Expand Down
2 changes: 1 addition & 1 deletionlib/matplotlib/backends/backend_qt5.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@


from .backend_qt import ( # noqa
backend_version,SPECIAL_KEYS,
SPECIAL_KEYS,
# Public API
cursord, _create_qApp, _BackendQT, TimerQT, MainWindow, FigureCanvasQT,
FigureManagerQT, ToolbarQt, NavigationToolbar2QT, SubplotToolQt,
Expand Down
3 changes: 1 addition & 2 deletionslib/matplotlib/backends/backend_qt5agg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,8 +6,7 @@
backends._QT_FORCE_QT5_BINDING = True
from .backend_qtagg import ( # noqa: F401, E402 # pylint: disable=W0611
_BackendQTAgg, FigureCanvasQTAgg, FigureManagerQT, NavigationToolbar2QT,
backend_version, FigureCanvasAgg, FigureCanvasQT
)
FigureCanvasAgg, FigureCanvasQT)


@_BackendQTAgg.export
Expand Down
2 changes: 1 addition & 1 deletionlib/matplotlib/backends/backend_qtagg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@
from .backend_agg import FigureCanvasAgg
from .backend_qt import QtCore, QtGui, _BackendQT, FigureCanvasQT
from .backend_qt import ( # noqa: F401 # pylint: disable=W0611
FigureManagerQT, NavigationToolbar2QT, backend_version)
FigureManagerQT, NavigationToolbar2QT)


class FigureCanvasQTAgg(FigureCanvasAgg, FigureCanvasQT):
Expand Down
3 changes: 2 additions & 1 deletionlib/matplotlib/backends/backend_svg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,9 +24,9 @@
from matplotlib import _path
from matplotlib.transforms import Affine2D, Affine2DBase


_log = logging.getLogger(__name__)

backend_version = mpl.__version__

# ----------------------------------------------------------------------
# SimpleXMLWriter class
Expand DownExpand Up@@ -1412,4 +1412,5 @@ def draw(self):

@_Backend.export
class _BackendSVG(_Backend):
backend_version = mpl.__version__
FigureCanvas = FigureCanvasSVG

[8]ページ先頭

©2009-2025 Movatter.jp