We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report mypy hangs and appears to have entered an infinite loop on some function argument type hints.
To Reproduce
The following code hangs mypy version 1.15.0 on my machine:
def normal_dist_intersection(m1: float | np.ndarray, m2: float | np.ndarray, s1: float | np.ndarray, s2: float | np.ndarray): return (m2*s1*s1 - s2 * (m1*s2 + s1*np.sqrt((m1 - m2)**2 + 2*(s1*s1 - s2*s2) * np.log(s1/s2)))) / (s1*s1 - s2*s2)
The following code works as expected. Note that the only difference is the removal of the last float type hint.
float
def normal_dist_intersection(m1: float | np.ndarray, m2: float | np.ndarray, s1: float | np.ndarray, s2: np.ndarray): return (m2*s1*s1 - s2 * (m1*s2 + s1*np.sqrt((m1 - m2)**2 + 2*(s1*s1 - s2*s2) * np.log(s1/s2)))) / (s1*s1 - s2*s2)
Your Environment
mypy.ini
The text was updated successfully, but these errors were encountered:
Thanks! Looks similar to #14978
Sorry, something went wrong.
No branches or pull requests
Bug Report
mypy hangs and appears to have entered an infinite loop on some function argument type hints.
To Reproduce
The following code hangs mypy version 1.15.0 on my machine:
The following code works as expected. Note that the only difference is the removal of the last
float
type hint.Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: