Skip to content

Commit

Permalink
Fix typos and ignore byte-compiled cached files
Browse files Browse the repository at this point in the history
Found via `codespell -S po -L filetest,keypair`
  • Loading branch information
kianmeng authored and cschramm committed Jan 1, 2023
1 parent 36450ec commit c0c6bf4
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
echo ::set-output name=NOTES::$notes
id: notes
- run: '[ -n "${{ steps.notes.outputs.NOTES }}" ] || (echo "Failed to parse changelog" && exit 1)'
- run: grep --quiet '^AC_INIT(\[blueman\], \[${{ steps.version.outputs.VERSION }}\]' configure.ac || (echo "Did not find expected verson in configure.ac" && exit 1)
- run: "grep --quiet \"version: '${{ steps.version.outputs.VERSION }}'\" meson.build || (echo 'Did not find expected verson in meson.build' && exit 1)"
- run: grep --quiet '^AC_INIT(\[blueman\], \[${{ steps.version.outputs.VERSION }}\]' configure.ac || (echo "Did not find expected version in configure.ac" && exit 1)
- run: "grep --quiet \"version: '${{ steps.version.outputs.VERSION }}'\" meson.build || (echo 'Did not find expected version in meson.build' && exit 1)"
- run: sudo apt-get update
- run: sudo apt-get install -y -qq --no-install-recommends automake autoconf libtool autopoint gettext cython3 libglib2.0-dev python3-dev python-gi-dev libbluetooth-dev
- run: CYTHONEXEC=cython3 ./autogen.sh
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ Makefile
# GLib Setting/Resource
*.gresource
gschemas.compiled

# Byte-compiled / optimized / DLL files
__pycache__/
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
* Support legacy devices without a Name property
* (Covered) Crash in agent's passkey / pin code methods
* Fix fading in GtkAnimation TreeRow(Color)Fade and CellFade classes.
* Do not explixitely destoy DeviceSelectorDialog blueman-sendto.
* Do not explicitly destroy DeviceSelectorDialog blueman-sendto.
* gui: Call the sub-classed widgets init function instead of GObject's
* Do not block manager with plugin dialog
* Exception in Tee class at exit
Expand Down Expand Up @@ -405,7 +405,7 @@ See https://github.com/blueman-project/blueman/wiki/PolicyKit
* SerialManager: Properly check for None
* NetConf: Treat UnicodeDecodeError as if there was no file
* Notification: Also check if notification daemon supports body
* Correct bold tag in portugese translation (thanks @andreyluiz)
* Correct bold tag in portuguese translation (thanks @andreyluiz)
* Properly check for None in SerialManager
* GameControllerWakeLock: Check for Class property first
* Fix bugs in NetworkService ui
Expand Down
2 changes: 1 addition & 1 deletion FAQ
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

To check for kernel support, use "lsusb" and/or "lspci" to find the
hardware ID and do a web search to determine whether it should be
supported. If you are not sure how to do tihs and/or are not sure
supported. If you are not sure how to do this and/or are not sure
how to interpret the results, scroll to the bottom of this document
for information on how to open an issue with the Blueman project.

Expand Down
2 changes: 1 addition & 1 deletion blueman/DeviceClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def gatt_appearance_to_name(appearance: int) -> str:
logging.debug(f"Reserved category found: {appearance}")
return gatt_appearance_categories[0][0]
elif cat > 81:
logging.warning(f"Invalid catagory found: {appearance}")
logging.warning(f"Invalid category found: {appearance}")
return gatt_appearance_categories[0][0]

cat_name, subcats = gatt_appearance_categories[cat]
Expand Down
2 changes: 1 addition & 1 deletion blueman/Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def launch(
name: str = "blueman",
sn: bool = True,
) -> bool:
"""Launch a gui app with starup notification"""
"""Launch a gui app with startup notification"""
context = None
gtktimestamp = Gtk.get_current_event_time()
if gtktimestamp == 0:
Expand Down
2 changes: 1 addition & 1 deletion blueman/gui/manager/ManagerProgressbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def finalize(self) -> bool:
self._get_window().set_cursor(None)
self.hbox.remove(self.eventbox)
self.hbox.remove(self.progressbar)
# self.hbox.remove(self.seperator)
# self.hbox.remove(self.separator)
self.finalized = True

if ManagerProgressbar.__instances__[-1] == self:
Expand Down
10 changes: 5 additions & 5 deletions blueman/main/DhcpClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DhcpClient(GObject.GObject):
["udhcpc", "-t", "20", "-x", "hostname", socket.gethostname(), "-n", "-i"]
]

quering: List[str] = []
querying: List[str] = []

def __init__(self, interface: str, timeout: int = 30) -> None:
"""The interface name has to be trusted / sanitized!"""
Expand All @@ -42,10 +42,10 @@ def run(self) -> None:
if not self._command:
raise Exception("No DHCP client found, please install dhclient, dhcpcd, or udhcpc")

if self._interface in DhcpClient.quering:
if self._interface in DhcpClient.querying:
raise Exception("DHCP already running on this interface")
else:
DhcpClient.quering.append(self._interface)
DhcpClient.querying.append(self._interface)

self._client = subprocess.Popen(self._command)
GLib.timeout_add(1000, self._check_client)
Expand All @@ -68,12 +68,12 @@ def complete() -> bool:
return False

GLib.timeout_add(1000, complete)
DhcpClient.quering.remove(self._interface)
DhcpClient.querying.remove(self._interface)
return False
elif status:
logging.error(f"dhcp client failed with status code {status}")
self.emit("error-occurred", status)
DhcpClient.quering.remove(self._interface)
DhcpClient.querying.remove(self._interface)
return False
else:
return True
2 changes: 1 addition & 1 deletion blueman/main/NetworkManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def deactivate(self) -> None:
def on_connection_deactivate(client: NM.Client, result: Gio.AsyncResult) -> None:
try:
client.deactivate_connection_finish(result)
logging.debug(f"Device {self.bdaddr} deactivated sucessfully")
logging.debug(f"Device {self.bdaddr} deactivated successfully")
self.reply_handler()
self.active_connection = None
except GLib.Error as e:
Expand Down
2 changes: 1 addition & 1 deletion blueman/main/PluginManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def load_plugin(self, name: Optional[str] = None, user_action: bool = False) ->
pass
except Exception:
if user_action:
d = ErrorDialog(_("<b>An error has occured while loading "
d = ErrorDialog(_("<b>An error has occurred while loading "
"a plugin. Please notify the developers "
"with the content of this message to our </b>\n"
"<a href=\"http://github.com/blueman-project/blueman/issues\">website.</a>"),
Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/BasePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _load(self) -> None:

# virtual methods
def on_load(self) -> None:
"""Do what is neccessary for the plugin to work like add watches or create ui elements"""
"""Do what is necessary for the plugin to work like add watches or create ui elements"""
pass

def on_unload(self) -> None:
Expand Down
10 changes: 5 additions & 5 deletions blueman/plugins/applet/DhcpClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def on_load(self) -> None:
self._any_network = AnyNetwork()
self._any_network.connect_signal('property-changed', self._on_network_prop_changed)

self.quering: List[str] = []
self.querying: List[str] = []

self._add_dbus_method("DhcpClient", ("s",), "", self.dhcp_acquire)

Expand All @@ -36,8 +36,8 @@ def _on_network_prop_changed(self, _network: AnyNetwork, key: str, value: Any, o
def dhcp_acquire(self, object_path: str) -> None:
device = Network(obj_path=object_path)["Interface"]

if device not in self.quering:
self.quering.append(device)
if device not in self.querying:
self.querying.append(device)
else:
return

Expand All @@ -48,14 +48,14 @@ def reply(_obj: Mechanism, result: str, _user_data: None) -> None:
_("Interface %(0)s bound to IP address %(1)s") % {"0": device, "1": result},
icon_name="network-workgroup").show()

self.quering.remove(device)
self.querying.remove(device)

def err(_obj: Mechanism, result: GLib.Error, _user_data: None) -> None:
logging.warning(result)
Notification(_("Bluetooth Network"), _("Failed to obtain an IP address on %s") % device,
icon_name="network-workgroup").show()

self.quering.remove(device)
self.querying.remove(device)

Notification(_("Bluetooth Network"), _("Trying to obtain an IP address on %s\nPlease wait…" % device),
icon_name="network-workgroup").show()
Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/applet/NetUsage.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class NetUsage(AppletPlugin, GObject.GObject, PPPConnectedListener):
__depends__ = ["Menu"]
__icon__ = "network-wireless-symbolic"
__description__ = _("Allows you to monitor your (mobile broadband) network traffic usage. Useful for limited "
"data access plans. This plugin tracks every device seperately.")
"data access plans. This plugin tracks every device separately.")
__author__ = "Walmis"
__autoload__ = False
__gsignals__: GSignals = {
Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/applet/SerialManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SerialManager(AppletPlugin, RFCOMMConnectedListener):
"Address, Name, service name, uuid16s, rfcomm node\n"
"For example:\n"
"AA:BB:CC:DD:EE:FF, Phone, DUN service, 0x1103, /dev/rfcomm0\n"
"uuid16s are returned as a comma seperated list\n\n"
"uuid16s are returned as a comma separated list\n\n"
"Upon device disconnection the script will be sent a HUP signal</span>")},
}

Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/services/Transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def on_apply(self) -> None:
opp_accept = self._builder.get_widget("opp-accept", Gtk.CheckButton)
self._config["opp-accept"] = opp_accept.get_active()
else:
raise NotImplementedError("Unknow option: %s" % opt)
raise NotImplementedError("Unknown option: %s" % opt)

self.clear_options()
logging.info("transfer apply")
Expand Down
4 changes: 2 additions & 2 deletions data/org.blueman.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<key type="i" name="rx">
<default>0</default>
<summary>RX</summary>
<description>Recieve</description>
<description>Receive</description>
</key>
<key type="i" name="time">
<default>0</default>
Expand Down Expand Up @@ -186,7 +186,7 @@
<key type="s" name="script">
<default>""</default>
<summary>Script to execute on connection</summary>
<description>The following arguments will be passed: "Address, Name, service name, uuid16s, rfcomm node". For example: "AA:BB:CC:DD:EE:FF, Phone, DUN service, 0x1103, /dev/rfcomm0". uuid16s are returned as a comma seperated list. Upon device disconnection the script will be sent a HUP signal"</description>
<description>The following arguments will be passed: "Address, Name, service name, uuid16s, rfcomm node". For example: "AA:BB:CC:DD:EE:FF, Phone, DUN service, 0x1103, /dev/rfcomm0". uuid16s are returned as a comma separated list. Upon device disconnection the script will be sent a HUP signal"</description>
</key>
</schema>
<schema id="org.blueman.plugins.discvmanager" path="/org/blueman/plugins/discvmanager/">
Expand Down
4 changes: 2 additions & 2 deletions stubs/gi/repository/GLib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,7 @@ class ErrorType(Enum, builtins.int):


class FileError(Enum, builtins.int):
ACCES = ... # type: FileError
ACESS = ... # type: FileError
AGAIN = ... # type: FileError
BADF = ... # type: FileError
EXIST = ... # type: FileError
Expand Down Expand Up @@ -2649,7 +2649,7 @@ class SliceConfig(Enum, builtins.int):


class SpawnError(Enum, builtins.int):
ACCES = ... # type: SpawnError
ACESS = ... # type: SpawnError
CHDIR = ... # type: SpawnError
FAILED = ... # type: SpawnError
FORK = ... # type: SpawnError
Expand Down

0 comments on commit c0c6bf4

Please sign in to comment.