mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 05:41:54 +03:00
Add ignore comment for error Pylance gives even though pyright doesn't
With Pyright's strict mode disabled, I got zero issues from the CLI, but got a Problem underline in VS Code from Pylance: - "Gio" is unknown import symbol Pylance(reportGeneralTypeIssues) This also silences, on the same line: - Type of "Gio" is unknown Pylance(reportUnknownVariableType) gi.repository uses DynamicImporter, which I assume is all the reason the type checker "needs" to be confused, so I'm not worried about this.
This commit is contained in:
parent
d8d0871729
commit
4ff90fa8ec
@ -92,7 +92,7 @@ def set_wallpaper(file_loc: str, first_run: bool = True):
|
||||
if desktop_env in ["gnome", "unity", "cinnamon"]:
|
||||
uri = "'file://%s'" % file_loc
|
||||
try:
|
||||
from gi.repository import Gio
|
||||
from gi.repository import Gio # type: ignore
|
||||
SCHEMA = "org.gnome.desktop.background"
|
||||
KEY = "picture-uri"
|
||||
gsettings = Gio.Settings.new(SCHEMA)
|
||||
|
Loading…
Reference in New Issue
Block a user