Skip to content

ref(mypy): Rename sort_stronger_modules to sort_weaklist#116106

Merged
armenzg merged 1 commit into
masterfrom
ref/mypy-rename-sort-weaklist
May 26, 2026
Merged

ref(mypy): Rename sort_stronger_modules to sort_weaklist#116106
armenzg merged 1 commit into
masterfrom
ref/mypy-rename-sort-weaklist

Conversation

@armenzg
Copy link
Copy Markdown
Member

@armenzg armenzg commented May 22, 2026

Rename tools.mypy_helpers.sort_stronger_modules to tools.mypy_helpers.sort_weaklist so the module name matches the pre-commit hook id (sort-mypy-weaklist) and the rest of the weaklist tooling (check_stronglist, prevent_weaklist_additions).

Backwards-compatible shim

The old module path stays as a 4-line re-export so getsentry's .pre-commit-config.yaml, which still calls python3 -m tools.mypy_helpers.sort_stronger_modules, keeps working. A follow-up PR will delete the shim once getsentry has been updated to call sort_weaklist.

Made with Cursor

The new name matches the pre-commit hook id (sort-mypy-weaklist) and the
rest of the weaklist tooling (check_stronglist, prevent_weaklist_additions).

A re-export shim is kept at the old module path so getsentry's
.pre-commit-config.yaml keeps working until it is updated to call the new
name. Once getsentry is updated, a follow-up will remove the shim.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 22, 2026
@armenzg armenzg self-assigned this May 22, 2026
@armenzg armenzg marked this pull request as ready for review May 22, 2026 21:53
@armenzg armenzg requested review from a team as code owners May 22, 2026 21:53
@armenzg armenzg requested review from JoshFerge and saponifi3d May 22, 2026 21:54

return ret

from tools.mypy_helpers.sort_weaklist import main
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We will keep both scripts until getsentry is merged.

@armenzg armenzg merged commit 99f29ce into master May 26, 2026
63 checks passed
@armenzg armenzg deleted the ref/mypy-rename-sort-weaklist branch May 26, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants