Skip to content
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

[widget audit] toga.Switch #1832

Merged
merged 18 commits into from
Apr 3, 2023
Merged

[widget audit] toga.Switch #1832

merged 18 commits into from
Apr 3, 2023

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Mar 29, 2023

Includes a rework of the base enabled flag. This was required because Switch on iOS and GTK is a composite widget, so determination of enabled status requires a different implementation.

Audit checklist

  • Core tests ported to pytest
  • Core tests at 100% coverage
  • Core docstrings complete, and in Sphinx format
  • Documentation complete and consistently formatted
  • cocoa backend at 100% coverage
  • winforms backend at 100% coverage
  • gtk backend at 100% coverage
  • iOS backend at 100% coverage
  • android backend at 100% coverage
  • Widget support table updated

# Allow a class with no new methods to be defined by assigning
# from an existing class. The col_offset means we only pay
# attention to assignments at the top level of a module, not
# assignments inside method bodies.
Copy link
Member Author

Choose a reason for hiding this comment

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

This line was catching the old_value = self._get_value('value') call in the dummy implementation. The line is required to allow for MainWindow = Window as a top level module assignment to be sufficient to define the existence of an interface class. This isn't a great check - but as soon as we're at 100% testbed coverage, we're not going to need the implementation checks anyway, so I figured a bandaid solution was sufficient.

Copy link
Member Author

Choose a reason for hiding this comment

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

The tests in this module are superseded by the testbed coverage.

@freakboy3742 freakboy3742 mentioned this pull request Mar 30, 2023
10 tasks
core/src/toga/widgets/box.py Outdated Show resolved Hide resolved
core/src/toga/widgets/divider.py Outdated Show resolved Hide resolved
core/src/toga/widgets/switch.py Outdated Show resolved Hide resolved
core/src/toga/widgets/switch.py Outdated Show resolved Hide resolved
@mhsmith mhsmith merged commit c2ee023 into beeware:main Apr 3, 2023
@freakboy3742 freakboy3742 deleted the audit-switch branch June 26, 2023 02:17
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.

2 participants