Skip to content

Commit ecf3151

Browse files
authored
1.1.2 (#127)
1 parent a48a6ac commit ecf3151

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "klib"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
description = "Customized data preprocessing functions for frequent tasks."
55
authors = ["Andreas Kanz <[email protected]>"]
66
license = "MIT"
@@ -148,7 +148,7 @@ line-length = 88
148148
target-version = "py38"
149149

150150
[tool.ruff.mccabe]
151-
max-complexity = 7
151+
max-complexity = 8
152152

153153
[tool.ruff.per-file-ignores]
154154
"test**" = ["ANN", "D", "S101", "PLR", "PT009", "N", "E501"]

src/klib/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Current version of klib."""
22

3-
__version__ = "1.1.1"
3+
__version__ = "1.1.2"

src/klib/describe.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from matplotlib.colors import to_rgb
2020
from matplotlib.gridspec import GridSpec # noqa: TCH002
2121
from screeninfo import get_monitors
22+
from screeninfo import ScreenInfoError
2223

2324
from klib.utils import _corr_selector
2425
from klib.utils import _missing_vals
@@ -615,19 +616,22 @@ def corr_interactive_plot(
615616
)
616617

617618
dpi = None
618-
for monitor in get_monitors():
619-
if monitor.is_primary:
619+
try:
620+
for monitor in get_monitors():
621+
if monitor.is_primary:
622+
if monitor.width_mm is None or monitor.height_mm is None:
623+
continue
624+
dpi = monitor.width / (monitor.width_mm / 25.4)
625+
break
626+
627+
if dpi is None:
628+
monitor = get_monitors()[0]
620629
if monitor.width_mm is None or monitor.height_mm is None:
621-
continue
622-
dpi = monitor.width / (monitor.width_mm / 25.4)
623-
break
624-
625-
if dpi is None:
626-
monitor = get_monitors()[0]
627-
if monitor.width_mm is None or monitor.height_mm is None:
628-
dpi = 96 # more or less arbitrary default value
629-
else:
630-
dpi = monitor.width / (monitor.width_mm / 25.4)
630+
dpi = 96 # more or less arbitrary default value
631+
else:
632+
dpi = monitor.width / (monitor.width_mm / 25.4)
633+
except ScreenInfoError:
634+
dpi = 96
631635

632636
heatmap.update_layout(
633637
title=f"Feature-correlation ({method})",

0 commit comments

Comments
 (0)