From 927f5d9f2517a075a261bbf80e3a82ac8eb91b23 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Tue, 26 Dec 2023 05:24:37 +0800 Subject: [PATCH] Fix typos (#7) * Fix typos Found via `typos --hidden --format brief` * inative -> inactive --------- Co-authored-by: kramo <93832451+kra-mo@users.noreply.github.com> --- hyperplane/gtk/help-overlay.blp | 2 +- hyperplane/item.py | 8 ++++---- hyperplane/items_page.py | 8 ++++---- hyperplane/postmaster_general.py | 4 ++-- hyperplane/utils/files.py | 4 ++-- hyperplane/utils/symbolics.py | 2 +- hyperplane/window.py | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hyperplane/gtk/help-overlay.blp b/hyperplane/gtk/help-overlay.blp index 02064d5..290d937 100644 --- a/hyperplane/gtk/help-overlay.blp +++ b/hyperplane/gtk/help-overlay.blp @@ -2,7 +2,7 @@ using Gtk 4.0; ShortcutsWindow help_overlay { modal: true; - // TODO: Figure out a way to make page action shortcuts work wihout specifying accels manually + // TODO: Figure out a way to make page action shortcuts work without specifying accels manually ShortcutsSection { section-name: "shortcuts"; diff --git a/hyperplane/item.py b/hyperplane/item.py index 3a7fee4..7ee215c 100644 --- a/hyperplane/item.py +++ b/hyperplane/item.py @@ -17,7 +17,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -"""An item represeting a file to be set up thorugh a `GtkSignalListItemFactory`.""" +"""An item representing a file to be set up through a `GtkSignalListItemFactory`.""" from pathlib import Path from typing import Any, Optional @@ -32,7 +32,7 @@ @Gtk.Template(resource_path=shared.PREFIX + "/gtk/item.ui") class HypItem(Adw.Bin): - """An item represeting a file to be set up thorugh a `GtkSignalListItemFactory`.""" + """An item representing a file to be set up through a `GtkSignalListItemFactory`.""" __gtype_name__ = "HypItem" @@ -263,7 +263,7 @@ def next_files_cb( picture, ) - # TODO: Could be oprimized if I called next_files with 3 the first time + # TODO: Could be optimized if I called next_files with 3 the first time files.next_files_async(1, GLib.PRIORITY_DEFAULT, None, next_files_cb, 0) def __dir_thumbnail_cb( @@ -451,7 +451,7 @@ def set_display_name(self, name: str) -> None: @GObject.Property(type=str) def extension(self) -> str: - """The extnesion of the file or None.""" + """The extension of the file or None.""" return self._extension @extension.setter diff --git a/hyperplane/items_page.py b/hyperplane/items_page.py index 3de2c24..8564e48 100644 --- a/hyperplane/items_page.py +++ b/hyperplane/items_page.py @@ -482,7 +482,7 @@ def __drop_file( def __drop_texture( self, _drop_target: Gtk.DropTarget, texture: Gdk.Texture, _x, _y ) -> None: - # TODO: Agian, copy-paste from __paste() + # TODO: Again, copy-paste from __paste() if self.tags: tags = tuple(tag for tag in shared.tags if tag in self.tags) dst = Gio.File.new_for_path( @@ -518,7 +518,7 @@ def __drop_texture( def __drop_text( self, _drop_target: Gtk.DropTarget, text: GObject.Value, _x, _y ) -> None: - # TODO: Agian again, copy-paste from __paste() + # TODO: Again again, copy-paste from __paste() if not text: # If text is an empty string return @@ -667,7 +667,7 @@ def dialog_cb() -> None: dialog.set_response_enabled("create", False) can_create = False - def set_incative(*_args: Any) -> None: + def set_inactive(*_args: Any) -> None: nonlocal can_create if not (text := entry.get_text().strip()): @@ -704,7 +704,7 @@ def create_folder(*_args: Any): ) entry.connect("entry-activated", create_folder) - entry.connect("changed", set_incative) + entry.connect("changed", set_inactive) dialog.choose() diff --git a/hyperplane/postmaster_general.py b/hyperplane/postmaster_general.py index 5758155..fd777ec 100644 --- a/hyperplane/postmaster_general.py +++ b/hyperplane/postmaster_general.py @@ -17,12 +17,12 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -"""A singleton class for sending signals throughtout the app.""" +"""A singleton class for sending signals throughout the app.""" from gi.repository import Gio, GObject, Gtk class HypPostmasterGeneral(GObject.Object): - """A singleton class for sending signals throughtout the app.""" + """A singleton class for sending signals throughout the app.""" __gtype_name__ = "HypPostmasterGeneral" diff --git a/hyperplane/utils/files.py b/hyperplane/utils/files.py index 3fccce2..c76849a 100644 --- a/hyperplane/utils/files.py +++ b/hyperplane/utils/files.py @@ -295,7 +295,7 @@ def get_gfile_path(gfile: Gio.File, uri_fallback=False) -> Path | str: """ Gets a pathlib.Path to represent a `GFile`. - If `uri_fallback` is true and no path can be retreived but the `GFile` + If `uri_fallback` is true and no path can be retrieved but the `GFile` has a valid URI, returns that instead. """ @@ -340,7 +340,7 @@ def validate_name( is_dir = path.is_dir() is_file = (not is_dir) and (path.exists()) - # TODO: More elegant (cross-platfrom) way to check for invalid paths + # TODO: More elegant (cross-platform) way to check for invalid paths if name in (".", ".."): if is_dir: error = _('A folder cannot be called "{}".').format(name) diff --git a/hyperplane/utils/symbolics.py b/hyperplane/utils/symbolics.py index baf8027..ae77417 100644 --- a/hyperplane/utils/symbolics.py +++ b/hyperplane/utils/symbolics.py @@ -49,7 +49,7 @@ def get_color_for_symbolic(content_type: str, gicon: Optional[Gio.Icon] = None) return "blue" # TODO: Certificates don't have a standard mime type - # TODO: I don't think addon, firmware or applicance are a thing for files + # TODO: I don't think addon, firmware or appliance are a thing for files # TODO: Add special cases like Flatpak detailed = { diff --git a/hyperplane/window.py b/hyperplane/window.py index 2ed3314..85cdc21 100644 --- a/hyperplane/window.py +++ b/hyperplane/window.py @@ -973,7 +973,7 @@ def __empty_trash(self, *_args: Any) -> None: empty_trash, True, ), - body=_("All items in the Trash will be permamently deleted."), + body=_("All items in the Trash will be permanently deleted."), ).choose() def __clear_recents(self, *_args: Any) -> None: