Skip to content

Temporary fix to update_all (Immediate bug fix)#2455

Merged
WebReflection merged 5 commits intopyscript:mainfrom
iliketocode2:fix-update_all
Feb 25, 2026
Merged

Temporary fix to update_all (Immediate bug fix)#2455
WebReflection merged 5 commits intopyscript:mainfrom
iliketocode2:fix-update_all

Conversation

@iliketocode2
Copy link
Copy Markdown
Contributor

@iliketocode2 iliketocode2 commented Feb 25, 2026

Description

This PR refactors the update_all method in ElementCollection to use the update method exclusively. It is meant to be a temporary and immediate bug fix before a further (possible) refactor occurs.

See discussion #2453 for more details and the subsequent conversation.

Changes

  • Modified ElementCollection.update_all in core/src/stdlib/pyscript/web.py to explicitly accept classes and style arguments.
  • Replaced the manual setattr loop with a direct call to element.update(classes=classes, style=style, **kwargs)
  • Updated the docstring for update_all
  • New tests for update_all: test_update_all_classes_parameter, test_update_all_style_parameter, and test_update_all_combined.

Changes in pyscript/docs can be seen in this PR:

Checklist

  • I have checked make build works locally.
  • I have created / updated documentation for this change (if applicable).

Copy link
Copy Markdown
Contributor

@WebReflection WebReflection left a comment

Choose a reason for hiding this comment

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

great simplification, thank you!

@WebReflection
Copy link
Copy Markdown
Contributor

@iliketocode2 do you have access rights to merge your own PRs after approval? If not, @ntoll , should we grant him that possibility?

@iliketocode2
Copy link
Copy Markdown
Contributor Author

I do not yet have permission to merge my own PR's after approval.

@WebReflection WebReflection merged commit e976967 into pyscript:main Feb 25, 2026
2 checks passed
@ntoll
Copy link
Copy Markdown
Member

ntoll commented Feb 26, 2026

Dammit - I look away for a moment and there you are, submitting PRs, having them reviewed and approved... and now also merged! 🤣

Bravo! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants