Fix crash when GnomeDesktop library is not installed

Type annotations referencing GnomeDesktop.RROutput were evaluated at
class definition time, causing an AttributeError when GnomeDesktop is
None. Using PEP 563 deferred annotations avoids this.

Fixes #6552

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mathieu Comandon
2026-03-16 22:12:29 -07:00
parent 1a0e2942b1
commit 7019866cd0

View File

@@ -1,5 +1,7 @@
"""Module to deal with various aspects of displays"""
from __future__ import annotations
# isort:skip_file
import enum
import os