Skip to content

Commit

Permalink
⏪ Revert lmfit.plot
Browse files Browse the repository at this point in the history
💬  Update type hints
  • Loading branch information
arafune committed Feb 1, 2024
1 parent e3220e8 commit 7ac92b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion arpes/fits/lmfit_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import xarray as xr
from lmfit import model

from arpes.plotting.utils import transform_labels

if TYPE_CHECKING:
import numpy as np
Expand Down Expand Up @@ -76,6 +75,8 @@ def patched_plot(
Returns:
The axes we plotted onto.
"""
from arpes.plotting.utils import transform_labels

try:
if self.model.n_dims != 1:
from arpes.plotting.utils import fancy_labels
Expand Down
6 changes: 3 additions & 3 deletions arpes/fits/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import os
from logging import DEBUG, INFO, Formatter, StreamHandler, getLogger
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Literal

import dill
import numpy as np
Expand Down Expand Up @@ -53,8 +53,8 @@

def result_to_hints(
model_result: lmfit.model.ModelResult | None,
defaults=None,
) -> dict[str, dict[str, Any]] | None:
defaults: dict[str, dict[Literal["value"], float]] | None = None,
) -> dict[str, dict[Literal["value"], float]] | None:
"""Turns an `lmfit.model.ModelResult` into a dictionary with initial guesses.
Args:
Expand Down

0 comments on commit 7ac92b1

Please sign in to comment.