Repository navigation
Remove outdated and duplicate names from the arcade namespace - #2965
Merged
Merged
Conversation
Removes AnimatedWalkingSprite (already documented as deprecated) and the FACE_* constants only it used, and get_game_controllers, a duplicate of get_joysticks whose name suggested it returned game controllers. Also drops the duplicate draw_lrbt_rectangle_filled/outline entries in arcade.__all__. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #2402.
We reviewed all 169 names in
arcade.__all__and picked the ones that are outdated, duplicated or wrong. This is a breaking change, with a changelog entry under Breaking Changes.Removed
AnimatedWalkingSprite, and theFACE_UP,FACE_DOWN,FACE_LEFT,FACE_RIGHTconstants that only it used (arcade/sprite/enums.pyis deleted).sprite_move_animationexample instead.get_game_controllers(). It did the same asget_joysticks(), and its name was wrong: it returned pygletJoystickobjects, while game controllers in Arcade come fromget_controllers().get_joysticks()'s docstring now says what it returns and points toget_controllers()for game controllers.draw_lrbt_rectangle_filledanddraw_lrbt_rectangle_outlineentries inarcade.__all__.Kept on purpose
set_background_color(7 examples use it) andMOUSE_BUTTON_*(theon_mouse_pressdocs use them). Both overlap newer APIs but are beginner-friendly.start_render/finish_render(static-image scripts) and the timing functions (performance statistics example). These are still current.Also updated
AnimatedWalkingSpritetests (test_sprite_animated_walking.pyand three lines oftest_sprite_init_arguments.py).util/update_quick_index.py, which listedarcade.sprite.enums.Testing
The full test suite passes (1840; the 3 removed were the
AnimatedWalkingSpritetests), and ruff, mypy, pyright and the docs build are clean.🤖 Generated with Claude Code