Skip to content

Commit

Permalink
Bump codespell from v2.3.0 to v2.4.0 (#3133)
Browse files Browse the repository at this point in the history
Bump codespell from v2.3.0 to v2.4.0
  • Loading branch information
brutusthebee authored Jan 27, 2025
1 parent 78d3e75 commit 2755072
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.0
hooks:
- id: codespell
# remove toml extra once Python 3.10 is no longer supported
Expand Down
1 change: 1 addition & 0 deletions changes/3133.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ``pre-commit`` hook for ``codespell`` was updated to its latest version.
14 changes: 7 additions & 7 deletions core/tests/window/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def test_widget_id_reusablity(window, app):
try:
new_label_widget = toga.Label(text="New Label", id=LABEL_WIDGET_ID)
except KeyError:
pytest.fail("Widget IDs that aren't part of a layout can be re-used.")
pytest.fail("Widget IDs that aren't part of a layout can be reused.")

# Create 2 new visible windows
second_window = toga.Window()
Expand All @@ -827,7 +827,7 @@ def test_widget_id_reusablity(window, app):
assert CONTENT_WIDGET_ID not in third_window.widgets
assert LABEL_WIDGET_ID not in third_window.widgets

# Adding content that has a child with a re-used ID should raise an error
# Adding content that has a child with a reused ID should raise an error
with pytest.raises(
KeyError,
match=r"There is already a widget with the id 'sample_label'",
Expand All @@ -836,7 +836,7 @@ def test_widget_id_reusablity(window, app):
assert CONTENT_WIDGET_ID not in third_window.widgets
assert LABEL_WIDGET_ID not in third_window.widgets

# Adding a child with a re-used ID should raise an error.
# Adding a child with a reused ID should raise an error.
third_window.content = third_window_content
with pytest.raises(
KeyError,
Expand All @@ -850,13 +850,13 @@ def test_widget_id_reusablity(window, app):
try:
another_label_widget = toga.Label(text="Another Label", id=LABEL_WIDGET_ID)
except KeyError:
pytest.fail("Widget IDs that aren't part of a layout can be re-used.")
pytest.fail("Widget IDs that aren't part of a layout can be reused.")

# If a widget using an ID is being *replaced*, the ID can be re-used.
# If a widget using an ID is being *replaced*, the ID can be reused.
try:
second_window.content = another_label_widget
except KeyError:
pytest.fail("Widget IDs that are replaced can be re-used.")
pytest.fail("Widget IDs that are replaced can be reused.")

# Close Window 2
second_window.close()
Expand All @@ -867,7 +867,7 @@ def test_widget_id_reusablity(window, app):
try:
third_window_content.add(new_label_widget)
except KeyError:
pytest.fail("Widget IDs that are replaced can be re-used.")
pytest.fail("Widget IDs that are replaced can be reused.")

third_window.close()

Expand Down
2 changes: 1 addition & 1 deletion gtk/src/toga_gtk/widgets/detailedlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def create(self):
self.gesture.set_propagation_phase(Gtk.PropagationPhase.BUBBLE)
self.gesture.connect("pressed", self.gtk_on_right_click)

# Set up a box that contains action buttons. This widget can be can be re-used
# Set up a box that contains action buttons. This widget can be can be reused
# for any row when it is activated.
self.native_action_buttons = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
action_buttons_hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
Expand Down

0 comments on commit 2755072

Please sign in to comment.