summaryrefslogtreecommitdiff
path: root/qutebrowser/commands
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-08-26 16:47:12 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-08-26 16:47:12 +0200
commitac9d67cce0dbecdde14c474db855243e9746ba04 (patch)
treeb564440308dc40b8ae40209a33cb1c47c95e17c6 /qutebrowser/commands
parentba30ac2af0860a8c92503179f6867ab0b46e3d31 (diff)
downloadqutebrowser-ac9d67cce0dbecdde14c474db855243e9746ba04.tar.gz
qutebrowser-ac9d67cce0dbecdde14c474db855243e9746ba04.zip
Automatically rewrite enums
See #5904
Diffstat (limited to 'qutebrowser/commands')
-rw-r--r--qutebrowser/commands/runners.py4
-rw-r--r--qutebrowser/commands/userscripts.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py
index b6b0ddd33..01a9c7edd 100644
--- a/qutebrowser/commands/runners.py
+++ b/qutebrowser/commands/runners.py
@@ -55,9 +55,9 @@ def _init_variable_replacements() -> Mapping[str, _ReplacementFunction]:
"""Return a dict from variable replacements to fns processing them."""
replacements: Dict[str, _ReplacementFunction] = {
'url': lambda tb: _url(tb).toString(
- QUrl.FullyEncoded | QUrl.RemovePassword),
+ QUrl.ComponentFormattingOption.FullyEncoded | QUrl.UrlFormattingOption.RemovePassword),
'url:pretty': lambda tb: _url(tb).toString(
- QUrl.DecodeReserved | QUrl.RemovePassword),
+ QUrl.ComponentFormattingOption.DecodeReserved | QUrl.UrlFormattingOption.RemovePassword),
'url:domain': lambda tb: "{}://{}{}".format(
_url(tb).scheme(), _url(tb).host(),
":" + str(_url(tb).port()) if _url(tb).port() != -1 else ""),
diff --git a/qutebrowser/commands/userscripts.py b/qutebrowser/commands/userscripts.py
index c7ed7e419..fcab83e0a 100644
--- a/qutebrowser/commands/userscripts.py
+++ b/qutebrowser/commands/userscripts.py
@@ -62,7 +62,7 @@ class _QtFIFOReader(QObject):
# pylint: enable=no-member,useless-suppression
self._fifo = os.fdopen(fd, 'r')
self._notifier = QSocketNotifier(cast(sip.voidptr, fd),
- QSocketNotifier.Read, self)
+ QSocketNotifier.Type.Read, self)
self._notifier.activated.connect( # type: ignore[attr-defined]
self.read_line)