• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

domdfcoding / domplotlib / 8845249263

26 Apr 2024 08:18AM UTC coverage: 93.103%. Remained the same
8845249263

push

github

web-flow
Set UNSAFE_PYO3_SKIP_VERSION_CHECK=1 for Python 3.13 (#42)

Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>

81 of 87 relevant lines covered (93.1%)

0.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/domplotlib/styles/_plt.py
1
#!/usr/bin/env python3
2
#
3
#  _plt.py
4
#
5
#  Copyright © 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
6
#
7
#  Permission is hereby granted, free of charge, to any person obtaining a copy
8
#  of this software and associated documentation files (the "Software"), to deal
9
#  in the Software without restriction, including without limitation the rights
10
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
#  copies of the Software, and to permit persons to whom the Software is
12
#  furnished to do so, subject to the following conditions:
13
#
14
#  The above copyright notice and this permission notice shall be included in all
15
#  copies or substantial portions of the Software.
16
#
17
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
#  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
#  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
#  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21
#  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22
#  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
#  OR OTHER DEALINGS IN THE SOFTWARE.
24
#
25

26
# 3rd party
27
import matplotlib  # type: ignore[import]
1✔
28

29
current_backend = matplotlib.rcParams["backend"]
1✔
30

31
try:  # pragma: no cover
32
        # stdlib
33
        import tkinter  # noqa: F401  # lgtm [py/unused-import]
34
        matplotlib.use("TkAgg")
35
except ImportError:  # pragma: no cover
36
        pass
37

38
try:
1✔
39
        # 3rd party
40
        import matplotlib.pyplot  # type: ignore[import]  # noqa: E402
1✔
41
except ImportError:  # pragma: no cover
42
        matplotlib.rcParams["backend"] = current_backend
43

44
plt = matplotlib.pyplot
1✔
45
plt.style.use("default")
1✔
46

47
__all__ = ["plt"]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc