-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop AttributeError from SpriteList._atlas and link Lazy SpriteList doc #1901
Merged
einarf
merged 17 commits into
pythonarcade:development
from
pushfoo:1882_spritelist_atlas_property_attribute_error
Sep 16, 2023
Merged
Stop AttributeError from SpriteList._atlas and link Lazy SpriteList doc #1901
einarf
merged 17 commits into
pythonarcade:development
from
pushfoo:1882_spritelist_atlas_property_attribute_error
Sep 16, 2023
Conversation
This file contains 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
* Remove if wrapping setting _atlas in SpriteList.__init__ * Update conditional _atlas setting in SpriteList._init_deferred * Update type annotations to make `SpriteList.atlas` optional
* Remove unecessary details * Link draw method * Link lazy sprite list section of the programming guide
* Add brief overview of when there may be a performance hit * Link the lazy sprite list section
pushfoo
changed the title
1882 spritelist atlas property attribute error
Fix #1882: eliminate attribute error by allowing None _atlas values
Sep 15, 2023
pushfoo
changed the title
Fix #1882: eliminate attribute error by allowing None _atlas values
Fix SpriteList._atlas attribute error by allowing None values
Sep 15, 2023
@bunny-therapist How does this look? On my system and the unit test runner, it seems to work. Your example also runs fine now: import arcade
class IssueDemonstrationWindow(arcade.Window):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
sl = arcade.SpriteList(lazy=True)
sl.atlas
window = IssueDemonstrationWindow()
arcade.run() My remaining concern is that we may want to expose |
pushfoo
changed the title
Fix SpriteList._atlas attribute error by allowing None values
Stop AttributeError from SpriteList._atlas and link Lazy SpriteList doc
Sep 16, 2023
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.
Changes
Related to #1882
None
forSpriteList._atlas
andSpriteList.atlas
lazy
-related unit testsSpriteList
docstrings:typing.cast
How to test
Code
./make.py test
Doc
./make.py clean
./make.py html
(optional, workaround for occasional build loop issue)./make.py serve
draw
andinitialize
method links go toSpriteList
's methods?Lazy SpriteLists
link go to relevant doc?initialize
method link go toSpriteList.initialize
?Lazy SpriteLists
link go to relevant doc?draw
method link go toSpriteList.draw
?Lazy SpriteLists
link go to relevant doc?