Skip to content

Conversation

@sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Oct 1, 2025

Summary

Reformulation of the public symbol type inference test suite to use class scopes instead of module scopes. This is in preparation for an upcoming change to module-global scopes (#20664).

Test Plan

Updated tests

@sharkdp sharkdp added testing Related to testing Ruff itself ty Multi-file analysis & type inference labels Oct 1, 2025
@sharkdp sharkdp force-pushed the david/reformulate-public-symbol-test-suite branch from 7e9a2f1 to 1c2c35e Compare October 1, 2025 12:17
# Modifications allowed in this case:
a = None
# Modification attempts yield an error:
# error: [unresolved-attribute]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only behavioral change. It makes sense that we emit an error for class scopes. For the module-global scope, "modifying a" was just creating a new variable.

@sharkdp sharkdp merged commit 963bc8c into main Oct 1, 2025
35 checks passed
@sharkdp sharkdp deleted the david/reformulate-public-symbol-test-suite branch October 1, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to testing Ruff itself ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants