diff --git a/.gitignore b/.gitignore index c18dd8d..3c3b979 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ __pycache__/ +.idea/ +*.pyc +venv/ +*.egg-info diff --git a/LICENSE b/LICENSE index 477e631..f34f020 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Priyanshu Tripathi +Copyright (c) 2023-Present CharaChorder Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/charachorder/__init__.py b/charachorder/__init__.py index 4c7b572..ade446a 100644 --- a/charachorder/__init__.py +++ b/charachorder/__init__.py @@ -17,4 +17,4 @@ from .device import * from .errors import * -from .types import * +from ._types import * diff --git a/charachorder/types.py b/charachorder/_types.py similarity index 100% rename from charachorder/types.py rename to charachorder/_types.py diff --git a/charachorder/device.py b/charachorder/device.py index b4e023f..fddcbff 100644 --- a/charachorder/device.py +++ b/charachorder/device.py @@ -19,7 +19,7 @@ UnknownProduct, UnknownVendor, ) -from .types import Chord, ChordPhrase, Keymap, OperatingSystem +from ._types import Chord, ChordPhrase, Keymap, OperatingSystem if TYPE_CHECKING: from typing_extensions import Self @@ -266,7 +266,7 @@ def get_chordmap(self, index: int) -> tuple[Chord, ChordPhrase]: return Chord.from_hex(chord), ChordPhrase.from_hex(phrase) def get_chordmaps(self) -> Generator[tuple[Chord, ChordPhrase], None, None]: - """Returns a iterable generator over all the chordmaps in the device.""" + """Returns an iterable generator over all the chordmaps in the device.""" chordmap_count = self.get_chordmap_count() return (self.get_chordmap(i) for i in range(chordmap_count)) @@ -339,7 +339,7 @@ def is_serial_mouse_enabled(self) -> bool: def is_usb_hid_keyboard_enabled(self) -> bool: return bool(self.get_parameter(0x11)) - def is_charachter_entry_enabled(self) -> bool: + def is_character_entry_enabled(self) -> bool: return bool(self.get_parameter(0x12)) def get_key_scan_duration(self) -> int: @@ -476,10 +476,10 @@ def enable_usb_hid_keyboard(self, *, commit: bool = False) -> bool: def disable_usb_hid_keyboard(self, *, commit: bool = False) -> bool: return self._maybe_commit(self.set_parameter(0x11, 0), commit) - def enable_charachter_entry(self, *, commit: bool = False) -> bool: + def enable_character_entry(self, *, commit: bool = False) -> bool: return self._maybe_commit(self.set_parameter(0x12, 1), commit) - def disable_charachter_entry(self, *, commit: bool = False) -> bool: + def disable_character_entry(self, *, commit: bool = False) -> bool: return self._maybe_commit(self.set_parameter(0x12, 0), commit) def set_key_scan_duration(self, value: int, *, commit: bool = False) -> bool: