The primary causes of the issue is the manipulation of how the gog_cloud.py and gog_cloud_hooks.py was getting imported in UnitTest via the importlib mechanism. That seemed to have broken the resolution of paths to `lutris.services.*`.
As the GTK issues that it was trying to side step has been fixed at the `tests` root level, the workaround is no longer needed.
Additional changes have been added to help harden any potentially UnitTest environment and circular import issues.
* Updated the github unit test run to use a virtual env to install the package dependencies and run the test
* Moved the imports of `lutris.services` subpackage to the method calls inside of the `__init__.py` script which will defer any potential circular imports until after the `lutris/services/__init__.py` script is fully imported.
The ruff-checker job runs `make dev` which installs pygobject-stubs,
but unlike the mypy-checker job it was missing the required Ubuntu
packages (libcairo2-dev, etc.), causing the build to fail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Python 3.14 evaluates annotations lazily (PEP 649), so unquoted
annotations like `threading.Event` work even when `threading` is only
imported under TYPE_CHECKING. On Python 3.10, these annotations are
evaluated eagerly and raise NameError at import time.
Add utils/check_annotations.py, an AST-based checker that detects
unquoted annotations referencing TYPE_CHECKING-only imports, covering
both bare names (`HTTPResponse`) and dotted access (`threading.Event`)
— the latter being a gap in ruff's FA102 rule. Wire it into `make
annotation-compat`, `make check`, and a new CI job.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both the github workflow action and the Makefile was updated to target Python 3.10.
This is to make sure that when locally running `make check`, it matches the result of the workflow.
Fix format string errors in ru.po and tr.po that caused ValueError
on Russian locale (fixes#6423). Add msgfmt --check to CI to catch
translation errors early.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents issues like #6419 where PEP 701 f-string syntax valid on
Python 3.12+ causes SyntaxError on older versions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>