diff options
author | toofar <toofar@spalge.com> | 2023-11-05 19:25:36 +1300 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2023-11-05 19:25:36 +1300 |
commit | 9656f43a09931be784285af378cb2fbd4657827c (patch) | |
tree | 632223bfabcee4d8a3e3f070af397bc23ccbee73 | |
parent | 30cd758d14dba8c22cd957068cb6859c1c694d19 (diff) | |
download | qutebrowser-9656f43a09931be784285af378cb2fbd4657827c.tar.gz qutebrowser-9656f43a09931be784285af378cb2fbd4657827c.zip |
help mypy deal with pathlib
Seems mypy and I agree on something. It thinks that pathlib is abusing
the division operation and making python a less intuitive
language. Not sure why it is complaining though really, doing `Path /
"one" / "two"` seems to work fine in practice, and its on the pathlib
documentation page.
I was seeing this error locally and on CI
qutebrowser/misc/pakjoy.py:155: error: Unsupported left operand type for / ("str") [operator]
resources_dir /= "lib" / "QtWebEngineCore.framework" / "Resources"
-rw-r--r-- | qutebrowser/misc/pakjoy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qutebrowser/misc/pakjoy.py b/qutebrowser/misc/pakjoy.py index ac07e3f76..084ab46bd 100644 --- a/qutebrowser/misc/pakjoy.py +++ b/qutebrowser/misc/pakjoy.py @@ -152,7 +152,7 @@ def copy_webengine_resources() -> pathlib.Path: # ourselves. importlib_resources("PyQt6.Qt6") can serve as a # replacement for the qtutils bit but it doesn't seem to help find the # actually Resources folder. - resources_dir /= "lib" / "QtWebEngineCore.framework" / "Resources" + resources_dir /= pathlib.Path("lib", "QtWebEngineCore.framework", "Resources") else: resources_dir /= "resources" work_dir = pathlib.Path(standarddir.cache()) / "webengine_resources_pak_quirk" |