Skip to content

Commit

Permalink
Fix typos (#7)
Browse files Browse the repository at this point in the history
* Fix typos

Found via `typos --hidden --format brief`

* inative -> inactive

---------

Co-authored-by: kramo <[email protected]>
  • Loading branch information
kianmeng and kra-mo authored Dec 25, 2023
1 parent 81b9b10 commit 927f5d9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion hyperplane/gtk/help-overlay.blp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 4 additions & 4 deletions hyperplane/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions hyperplane/items_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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()):
Expand Down Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions hyperplane/postmaster_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions hyperplane/utils/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hyperplane/utils/symbolics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion hyperplane/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 927f5d9

Please sign in to comment.