Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 1, 2025

Close and reopen this PR to trigger CI

@github-actions github-actions bot added the ty Multi-file analysis & type inference label Oct 1, 2025
@github-actions github-actions bot requested a review from dcreager as a code owner October 1, 2025 00:41
@sharkdp sharkdp closed this Oct 1, 2025
@sharkdp sharkdp reopened this Oct 1, 2025
Copy link
Contributor Author

github-actions bot commented Oct 1, 2025

Diagnostic diff on typing conformance tests

Changes were detected when running ty on typing conformance tests
--- old-output.txt	2025-10-01 07:48:06.888006507 +0000
+++ new-output.txt	2025-10-01 07:48:10.058006273 +0000
@@ -1,6 +1,6 @@
 WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.
 fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/execute.rs:217:25 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_type_statement.py`: `PEP695TypeAliasType < 'db >::value_type_(Id(cc17)): execute: too many cycle iterations`
-fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/execute.rs:217:25 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_typealiastype.py`: `infer_definition_types(Id(15c2d)): execute: too many cycle iterations`
+fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/execute.rs:217:25 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_typealiastype.py`: `infer_definition_types(Id(15c32)): execute: too many cycle iterations`
 _directives_deprecated_library.py:15:31: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int`
 _directives_deprecated_library.py:30:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `str`
 _directives_deprecated_library.py:36:41: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Self@__add__`

Copy link
Contributor Author

github-actions bot commented Oct 1, 2025

mypy_primer results

Changes were detected when running on open source projects
Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/commands/menu.py:63:40: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- tanjun/commands/message.py:62:34: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- tanjun/commands/slash.py:88:56: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- Found 120 diagnostics
+ Found 117 diagnostics

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/_specs.pyi:72:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `object` and `object`
- src/bokeh/_specs.pyi:72:25: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- src/bokeh/_specs.pyi:72:49: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- src/bokeh/core/property/visual.pyi:43:38: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- src/bokeh/core/property/visual.pyi:43:54: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- src/bokeh/core/property/visual.pyi:43:73: error[non-subscriptable] Cannot subscript object of type `UnionType` with no `__getitem__` method
- Found 466 diagnostics
+ Found 462 diagnostics

sympy (https://github.com/sympy/sympy)
- sympy/testing/tests/diagnose_imports.py:153:58: error[invalid-argument-type] Argument to function `__import__` is incorrect: Expected `Sequence[str]`, found `Unknown | None`
- Found 13913 diagnostics
+ Found 13912 diagnostics
No memory usage changes detected ✅

@sharkdp
Copy link
Contributor

sharkdp commented Oct 1, 2025

Looks like this typeshed PR is causing us problems. Looking into it.

@sharkdp
Copy link
Contributor

sharkdp commented Oct 1, 2025

Oh, and this is also causing problems.

@sharkdp sharkdp force-pushed the typeshedbot/sync-typeshed branch from cf5904f to 5d4a230 Compare October 1, 2025 07:38

reveal_type(t) # revealed: time
# TODO: this should be `time`, once we support specialization of generic protocols
reveal_type(t) # revealed: Unknown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python/typeshed#14786 changed the signature of copy.replace from

_SR = TypeVar("_SR", bound=_SupportsReplace)

def replace(obj: _SR, /, **changes: Any) -> _SR: ...

to

def replace(obj: _SupportsReplace[_RT_co], /, **changes: Any) -> _RT_co: ...

which our generics solver does not support yet 😢.

I don't think it's important enough to implement a workaround for, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

@sharkdp sharkdp requested review from AlexWaygood and removed request for AlexWaygood October 1, 2025 08:04
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sharkdp sharkdp merged commit d9473a2 into main Oct 1, 2025
39 checks passed
@sharkdp sharkdp deleted the typeshedbot/sync-typeshed branch October 1, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants