Skip to content

Commit

Permalink
💬 Update type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Feb 27, 2024
1 parent d4d1b19 commit c0b8392
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/arpes/plotting/qt_ktool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from matplotlib.colors import Colormap
from PySide6.QtWidgets import QGridLayout

from arpes._typing import ANGLE, XrTypes
from arpes._typing import ANGLE

__all__ = (
"KTool",
Expand Down Expand Up @@ -120,8 +120,9 @@ def updater(value: str | float) -> None:

for dim in convert_dims:
ui[f"control-{dim}"].subject.subscribe(update_dimension_name(dim))

controls.setFixedHeight(qt_info.inches_to_px(1.75))
qt_info_size = qt_info.inches_to_px(1.75)
assert isinstance(qt_info_size, int)
controls.setFixedHeight(qt_info_size)

self.main_layout.addLayout(self.content_layout, 0, 0)
self.main_layout.addWidget(controls, 1, 0)
Expand Down
3 changes: 2 additions & 1 deletion src/arpes/xarray_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,8 @@ def _experimentalinfo_to_dict(conditions: EXPERIMENTINFO) -> dict[str, str]:
min_hv = float(v.min())
max_hv = float(v.max())
transformed_dict[k] = (
f"<strong> from </strong> {min_hv} <strong> to </strong> {max_hv} eV"
f"<strong> from </strong> {min_hv} "
f"<strong> to </strong> {max_hv} eV"
)
elif isinstance(v, float) and not np.isnan(v):
transformed_dict[k] = f"{v} eV"
Expand Down

0 comments on commit c0b8392

Please sign in to comment.