Skip to content

Commit 7ca4334

Browse files
committed
make a couple of Any annotations more precise
1 parent e27c189 commit 7ca4334

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

stagpy/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import signal
77
import sys
88
import warnings
9-
from typing import Any, NoReturn
9+
from typing import NoReturn
1010

1111

12-
def sigint_handler(*_: Any) -> NoReturn:
12+
def sigint_handler(*_: object) -> NoReturn:
1313
"""Handler of SIGINT signal.
1414
1515
It is set when you use StagPy as a command line tool to handle gracefully

stagpy/_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import matplotlib.pyplot as plt
99

1010
if typing.TYPE_CHECKING:
11-
from typing import Any, Optional
11+
from typing import Optional
1212

1313
from matplotlib.figure import Figure
1414
from numpy.typing import NDArray
@@ -102,7 +102,7 @@ def baredoc(obj: object) -> str:
102102
return doc.rstrip(" .").lstrip()
103103

104104

105-
def find_in_sorted_arr(value: Any, array: NDArray, after: bool = False) -> int:
105+
def find_in_sorted_arr(value: float, array: NDArray, after: bool = False) -> int:
106106
"""Return position of element in a sorted array.
107107
108108
Returns:
@@ -115,4 +115,4 @@ def find_in_sorted_arr(value: Any, array: NDArray, after: bool = False) -> int:
115115
ielt -= 1
116116
if not after and array[ielt] != value and ielt > 0:
117117
ielt -= 1
118-
return ielt
118+
return int(ielt)

0 commit comments

Comments
 (0)