Skip to content

[ty] Improve disambiguation of types via fully qualified names#20141

Merged
AlexWaygood merged 1 commit intomainfrom
alex/return-fully-qualified
Aug 29, 2025
Merged

[ty] Improve disambiguation of types via fully qualified names#20141
AlexWaygood merged 1 commit intomainfrom
alex/return-fully-qualified

Conversation

@AlexWaygood
Copy link
Member

Summary

Some small followups to #19850:

  • Disambiguate classes (where appropriate) in invalid-return-type as well as invalid-assignment
  • Extend the disambiguation to work with the Display of generic aliases

Test Plan

Snapshot added

@AlexWaygood AlexWaygood requested a review from carljm as a code owner August 28, 2025 19:46
@AlexWaygood AlexWaygood added the ty Multi-file analysis & type inference label Aug 28, 2025
@AlexWaygood AlexWaygood added the diagnostics Related to reporting of diagnostics. label Aug 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@AlexWaygood AlexWaygood force-pushed the alex/return-fully-qualified branch 2 times, most recently from c189159 to cb4a70d Compare August 28, 2025 19:51
@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2025

mypy_primer results

Changes were detected when running on open source projects
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/server/api/artifacts.py:46:12: error[invalid-return-type] Return type does not match returned value: expected `Artifact`, found `Artifact`
+ src/prefect/server/api/artifacts.py:46:12: error[invalid-return-type] Return type does not match returned value: expected `src.prefect.server.schemas.core.Artifact`, found `src.prefect.server.database.orm_models.Artifact`
No memory usage changes detected ✅

Copy link
Contributor

@carljm carljm 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!

@AlexWaygood AlexWaygood force-pushed the alex/return-fully-qualified branch from cb4a70d to 4c23419 Compare August 29, 2025 08:40
@AlexWaygood AlexWaygood enabled auto-merge (squash) August 29, 2025 08:40
@AlexWaygood AlexWaygood merged commit 04dc223 into main Aug 29, 2025
37 checks passed
@AlexWaygood AlexWaygood deleted the alex/return-fully-qualified branch August 29, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostics Related to reporting of diagnostics. ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants