[ty] Fix assignability of intersections with bounded typevars by AlexWaygood · Pull Request #24502 · astral-sh/ruff (original) (raw)
ecosystem-analyzer results
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
| invalid-await | 0 | 40 | 0 |
| invalid-argument-type | 0 | 13 | 0 |
| invalid-assignment | 1 | 0 | 0 |
| invalid-return-type | 0 | 1 | 0 |
| no-matching-overload | 0 | 1 | 0 |
| unsupported-operator | 0 | 1 | 0 |
| Total | 1 | 56 | 0 |
Large timing changes:
| Project | Old Time | New Time | Change |
|---|---|---|---|
| freqtrade | 0.55s | 0.91s | +65% |
Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.
Raw diff (16 changes)
Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/annotations.py:1949:74 error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedint | float, found_NumberT@__getitem__ & ~int - tanjun/annotations.py:1996:74 error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedint | float, found_NumberT@__getitem__ & ~int - tanjun/annotations.py:2110:75 error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedint | float, found_NumberT@__getitem__ & ~float - tanjun/annotations.py:2110:86 error[invalid-argument-type] Argument to bound method
__init__is incorrect: Expectedint | float, found_NumberT@__getitem__ & ~float - tanjun/annotations.py:2724:26 error[invalid-argument-type] Argument to function
parse_annotated_argsis incorrect: ExpectedSlashCommand[Any] | MessageCommand[Any], found_CommandUnionT@with_annotated_args & ~AlwaysFalsy
altair (https://github.com/vega/altair)
- altair/vegalite/v6/api.py:1179:45 error[invalid-argument-type] Argument to function
_reveal_parsed_shorthandis incorrect: ExpectedMapping[str, Any], found_C@Then & Top[dict[Unknown, Unknown]]
artigraph (https://github.com/artigraph/artigraph)
- src/arti/internal/type_hints.py:177:37 error[invalid-argument-type] Argument to function
_check_issubclassis incorrect: Expectedtype, foundT@lenient_issubclass & ~tuple[object, ...]
beartype (https://github.com/beartype/beartype)
- beartype/_decor/_nontype/decornontype.py:161:43 error[invalid-argument-type] Argument is incorrect: Argument type
BeartypeableT@beartype_nontype & ~typedoes not satisfy upper bound((...) -> Any) | classmethod[Unknown, (...), Unknown] | propertyof type variableBeartypeableT - beartype/_decor/_nontype/decornontype.py:220:47 error[invalid-argument-type] Argument is incorrect: Argument type
BeartypeableT@beartype_nontype & ~typedoes not satisfy upper bound((...) -> Any) | classmethod[Unknown, (...), Unknown] | propertyof type variableBeartypeableT - beartype/_decor/decorcore.py:133:26 error[invalid-argument-type] Argument to function
beartype_nontypeis incorrect: Argument typeBeartypeableT@_beartype_object_fatal & ~typedoes not satisfy upper bound((...) -> Any) | classmethod[Unknown, (...), Unknown] | propertyof type variableBeartypeableT
hydpy (https://github.com/hydpy-dev/hydpy)
- hydpy/auxs/iuhtools.py:436:25 error[unsupported-operator] Unary operator
-is not supported for object of typeVectorFloatFlex@__call__ | Unknown - hydpy/auxs/iuhtools.py:431:17 error[no-matching-overload] No overload of function
clipmatches arguments
- hydpy/auxs/iuhtools.py:431:17 error[invalid-assignment] Object of type
ndarray[tuple[Any, ...], dtype[Any]]is not assignable toVectorFloatFlex@__call__
setuptools (https://github.com/pypa/setuptools)
- setuptools/glob.py:75:42 error[invalid-argument-type] Argument to function
has_magicis incorrect: Expectedstr | bytes, foundAnyStr@_iglob & ~AlwaysFalsy
xarray (https://github.com/pydata/xarray)
- xarray/core/dtypes.py:92:36 error[invalid-argument-type] Argument to function
datetime_datais incorrect: Expectedstr | _HasDType[dtype[datetime64[date | int | None] | timedelta64[timedelta | int | None]]] | dtype[datetime64[date | int | None] | timedelta64[timedelta | int | None]] | _HasNumPyDType[dtype[datetime64[date | int | None] | timedelta64[timedelta | int | None]]], foundT_dtype@maybe_promote & dtype[object] - xarray/core/dtypes.py:105:36 error[invalid-argument-type] Argument to function
datetime_datais incorrect: Expectedstr | _HasDType[dtype[datetime64[date | int | None] | timedelta64[timedelta | int | None]]] | dtype[datetime64[date | int | None] | timedelta64[timedelta | int | None]] | _HasNumPyDType[dtype[datetime64[date | int | None] | timedelta64[timedelta | int | None]]], foundT_dtype@maybe_promote & dtype[object]