Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/checkTranslation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.

import sys
import os
import sys

from crowdin_api import CrowdinClient


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
$curDate = Get-Date -Format "yyyyMMdd"
$curYear = Get-Date -Format "yyyy"
$tagName = "v" + (Get-Date -Format "yy.MM.dd")

echo "CUR_DATE=$curDate" >> $env:GITHUB_ENV
echo "CUR_YEAR=$curYear" >> $env:GITHUB_ENV
echo "TAG_NAME=$tagName" >> $env:GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Matches Ruff version in pyproject.
rev: v0.15.20
rev: v0.16.1
hooks:
- id: ruff
name: lint with ruff
Expand Down
19 changes: 10 additions & 9 deletions addon/globalPlugins/sayKeyboardLanguage.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
# Inspired by the following solution, on the forum Stack Overflow:
# https://stackoverflow.com/questions/42047253/how-to-detect-current-keyboard-language-in-python

import globalPluginHandler
import ui
import locale
from scriptHandler import script
from collections.abc import Callable

# For translations.
import addonHandler
import buildVersion
import globalPluginHandler
import ui

# Category for the input gestures.
from globalCommands import SCRCAT_INPUT
from typing import Callable

# For translations.
import addonHandler
from scriptHandler import script

addonHandler.initTranslation()
_: Callable[[str], str]
Expand All @@ -42,10 +42,11 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
**speakOnDemand,
)
def script_sayCurKeyboardLanguage(self, gesture):
import winUser
import scriptHandler
import ctypes

import languageHandler
import scriptHandler
import winUser

# Getting the handle of the foreground window.
curWindow = winUser.getForegroundWindow()
Expand Down
4 changes: 2 additions & 2 deletions site_scons/site_tools/NVDATool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

"""

from SCons.Script import Environment, Builder
from SCons.Script import Builder, Environment

from .addon import createAddonBundleFromPath
from .manifests import generateManifest, generateTranslatedManifest
from .docs import md2html
from .manifests import generateManifest, generateTranslatedManifest


def generate(env: Environment):
Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_tools/NVDATool/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def matchesNoPatterns(path: Path, patterns: Iterable[str]) -> bool:
"""Checks if the path, the first argument, does not match any of the patterns passed as the second argument."""
return not any((path.match(pattern) for pattern in patterns))
return not any(path.match(pattern) for pattern in patterns)


def createAddonBundleFromPath(path: str | Path, dest: str, excludePatterns: Iterable[str]):
Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_tools/NVDATool/manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import gettext
from functools import partial

from .typings import AddonInfo, BrailleTables, SymbolDictionaries, SpeechDictionaries
from .typings import AddonInfo, BrailleTables, SpeechDictionaries, SymbolDictionaries
from .utils import format_nested_section


Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_tools/NVDATool/typings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TypedDict, Protocol
from typing import Protocol, TypedDict


class AddonInfo(TypedDict):
Expand Down
Loading