Skip to content

Commit ff2bb9d

Browse files
authored
⬆️ upgrade development dependencies (#501)
2 parents 0b1d0fc + 95bddb0 commit ff2bb9d

File tree

7 files changed

+116
-119
lines changed

7 files changed

+116
-119
lines changed

optype/_core/_do.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def do_setitem(obj: _c.CanSetitem[_KT, _VT], key: _KT, value: _VT, /) -> None:
174174
def do_delitem(obj: _c.CanDelitem[_KT], key: _KT, /) -> None:
175175
"""Same as `del obj[key]`."""
176176
# https://github.com/astral-sh/ty/issues/1799
177-
del obj[key] # ty:ignore[non-subscriptable]
177+
del obj[key]
178178

179179

180180
def do_missing(obj: _c.CanMissing[_KT, _DT], key: _KT, /) -> _DT:

optype/_core/_has.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __dir__() -> list[str]:
6363
_QualNameT = TypeVar(
6464
"_QualNameT",
6565
bound=str,
66-
default=_NameT, # pyrefly: ignore[invalid-type-var]
66+
default=_NameT,
6767
)
6868
_StrT_co = TypeVar("_StrT_co", bound=str, default=str, covariant=True)
6969

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extra = [
6767
"optype[numpy]",
6868
]
6969
lint = [
70-
"dprint-py>=0.50.2.0",
70+
"dprint-py>=0.51.1.0",
7171
"ruff>=0.14.10",
7272
"sp-repo-review[cli]>=2025.11.21",
7373
]
@@ -82,8 +82,8 @@ type = [
8282
{ include-group = "test" },
8383
"basedpyright>=1.36.2",
8484
"mypy[faster-cache]>=1.19.1",
85-
"pyrefly==0.46.0",
86-
"ty==0.0.6",
85+
"pyrefly==0.46.2",
86+
"ty==0.0.8",
8787
]
8888
dev = [
8989
{ include-group = "extra" },

tests/core/test_can.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def test_can_add_same_int() -> None:
5151
r1: op.CanAddSame[object] = x # type: ignore[assignment] # pyright: ignore[reportAssignmentType]
5252

5353
# https://github.com/facebook/pyrefly/issues/1783
54-
assert isinstance(x, op.CanAddSame) # pyrefly:ignore[invalid-argument]
55-
assert issubclass(int, op.CanAddSame) # pyrefly:ignore[invalid-argument]
54+
assert isinstance(x, op.CanAddSame)
55+
assert issubclass(int, op.CanAddSame)
5656

5757

5858
def test_iadd() -> None:
@@ -189,8 +189,8 @@ def test_can_iadd_same_list_accept() -> None:
189189
a3: op.CanIAddSame[bytes] = x
190190

191191
# https://github.com/facebook/pyrefly/issues/1783
192-
assert isinstance(x, op.CanIAddSame) # pyrefly:ignore[invalid-argument]
193-
assert issubclass(list, op.CanIAddSame) # pyrefly:ignore[invalid-argument]
192+
assert isinstance(x, op.CanIAddSame)
193+
assert issubclass(list, op.CanIAddSame)
194194

195195

196196
def test_can_iadd_same_list_reject() -> None:
@@ -230,8 +230,7 @@ def test_can_iter_collection_str(
230230
value: (str | tuple[str, ...] | list[str] | set[str] | dict[str, object]),
231231
) -> None:
232232
# (in)sanity checks
233-
# https://github.com/facebook/pyrefly/issues/1784
234-
assert isinstance(value, Collection) # pyrefly:ignore[invalid-argument]
233+
assert isinstance(value, Collection) # pyrefly: ignore[unsafe-overlap]
235234
assert not isinstance(value, Iterator)
236235

237236
value_iter_next: op.CanIter[op.CanNext[str]] = value
@@ -247,7 +246,7 @@ def test_can_iter_collection_str(
247246

248247
assert isinstance(value, op.CanIter)
249248
assert not isinstance(value, op.CanNext)
250-
assert not isinstance(value, op.CanIterSelf)
249+
assert not isinstance(value, op.CanIterSelf) # pyrefly: ignore[unsafe-overlap]
251250

252251
ivalue = iter(value)
253252
ivalue_iter_next: op.CanIter[op.CanNext[str]] = ivalue
@@ -274,9 +273,10 @@ def test_unsliceable_sequence() -> None:
274273
seq_int_str: op.CanSequence[int, str] = UnsliceableSequence()
275274
seq_wrong_str: op.CanSequence[slice, str] = UnsliceableSequence() # type: ignore[assignment] # pyright: ignore[reportAssignmentType]
276275

277-
# https://github.com/facebook/pyrefly/issues/1783
278-
# pyrefly:ignore[invalid-argument]
279-
assert isinstance(UnsliceableSequence, op.CanSequence)
276+
assert isinstance(
277+
UnsliceableSequence,
278+
op.CanSequence, # pyrefly: ignore[unsafe-overlap]
279+
)
280280

281281

282282
@pytest.mark.parametrize(

tests/numpy/test_ufunc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ def test_anyufunc_ufunc_type() -> None:
3939
# purposefully wrong
4040
tp_4_str: type[UFunc[Any, Any, Any, LiteralString]] = np.ufunc # type: ignore[assignment] # pyright: ignore[reportAssignmentType]
4141

42-
# https://github.com/facebook/pyrefly/issues/1783
43-
assert isinstance(tp, UFunc) # pyrefly: ignore[invalid-argument]
42+
assert isinstance(tp, UFunc) # pyrefly: ignore[unsafe-overlap]
4443

4544

4645
def test_anyufunc_ufunc_11() -> None:

tests/test_copy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ def test_can_replace_date() -> None:
7979
# pyrefly: ignore[bad-assignment]
8080
d_copy_self: op.copy.CanReplaceSelf = d
8181

82-
# https://github.com/facebook/pyrefly/issues/1783
83-
assert isinstance(d, op.copy.CanReplace) # pyrefly: ignore[invalid-argument]
82+
assert isinstance(d, op.copy.CanReplace) # pyrefly: ignore[unsafe-overlap]
8483
assert isinstance(d, op.copy.CanReplaceSelf)
8584

8685

@@ -107,6 +106,5 @@ def __replace__(self, /, *, val: int) -> Self:
107106
# pyrefly: ignore[bad-assignment]
108107
d_copy_self: op.copy.CanReplaceSelf = obj
109108

110-
# https://github.com/facebook/pyrefly/issues/1783
111-
assert isinstance(obj, op.copy.CanReplace) # pyrefly: ignore[invalid-argument]
109+
assert isinstance(obj, op.copy.CanReplace) # pyrefly: ignore[unsafe-overlap]
112110
assert isinstance(obj, op.copy.CanReplaceSelf)

0 commit comments

Comments
 (0)