Florian Bruhin
50a1f004f0
qt6 mypy: Enable on CI
2023-06-29 23:16:35 +02:00
Florian Bruhin
ea2de0b40c
qt6 mypy: Fix remaining unused-ignore issues
2023-06-29 23:16:16 +02:00
Florian Bruhin
69e2bbd766
qt6 mypy: Fix PyQt5 QUrl issues with a more clever approach
2023-06-29 23:06:54 +02:00
Florian Bruhin
42f0ee36e3
qt6 mypy: Remove PyQt5 type ignores
2023-06-29 22:11:03 +02:00
Florian Bruhin
d13bd0675d
qt6 mypy: Fix handling of AbstractTab.is_deleted()
2023-06-29 22:10:44 +02:00
Florian Bruhin
7b1029653f
qt6 mypy: Don't attempt to type-check OpenGL functions
2023-06-29 22:06:25 +02:00
Florian Bruhin
c8744122f6
qt6 mypy: Fix unused-ignores with mypy-pyqt5
2023-06-29 21:56:08 +02:00
Florian Bruhin
3811ec71a7
mypy qt6: Ignore unreachable after rebase
2023-06-29 21:17:16 +02:00
Florian Bruhin
ba694fe001
qt6 mypy: Fix qt5 mypy regressions
2023-06-29 21:10:45 +02:00
Florian Bruhin
f2c308c6c1
qt6 mypy: Fix remaining issues
...
30 -> 0 errors
2023-06-29 21:10:43 +02:00
Florian Bruhin
09df332997
qt6 mypy: Fix typing around qenum_key
...
36 -> 30 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
c42ce85820
qt6 mypy: Add missing pyqtProperty
...
39 -> 36 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
2ac6b0768b
qt6 mypy: Fix first batch of various issues
...
50 -> 39 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
1ee66dd5ae
qt6 mypy: Fix first batch of various issues
...
50 -> 40 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
cca08369be
qt6 mypy: Disable warn-unused-ignores
...
The ignores needed between Qt 5 and Qt 6 differ.
We could buy into e.g. only Qt 6 linting, but apparently e.g. VS Code
also shows more errors when removing the Qt 5 type ignores.
Instead, disable this for now. We might want to re-enable it when we see
a major change in the mypy changelog and filter the results manually.
81 -> 50 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
53d67e2c39
qt6 mypy: Lie about WebKit being available with Qt 6
...
185 -> 81 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
44bb9d7bad
qt6 mypy: Fix moved Qt 6 imports in TYPE_CHECKING blocks
...
191 -> 185 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
d27902e054
qt6 mypy: Add PyQt6-stubs
...
Unfortunately there is no PyPI release yet, so install from git.
243 -> 191 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin
772c39cea2
scripts: Add a help to docker generate script
2023-06-29 10:30:55 +02:00
Florian Bruhin
5fa878c7d1
py38: Run modified pyupgrade
...
Modified to leave f-strings alone for now, and also not do some other
stuff we should do separately:
diff --git i/pyupgrade/_main.py w/pyupgrade/_main.py
index 4292174..37547b3 100644
--- i/pyupgrade/_main.py
+++ w/pyupgrade/_main.py
@@ -294,7 +294,8 @@ def _fix_tokens(contents_text: str) -> str:
token.utf8_byte_offset == 0 and
token.line < 3 and
token.name == 'COMMENT' and
- tokenize.cookie_re.match(token.src)
+ tokenize.cookie_re.match(token.src) and
+ False
):
del tokens[i]
assert tokens[i].name == 'NL', tokens[i].name
diff --git i/pyupgrade/_plugins/fstrings.py w/pyupgrade/_plugins/fstrings.py
index e648075..eb44c0c 100644
--- i/pyupgrade/_plugins/fstrings.py
+++ w/pyupgrade/_plugins/fstrings.py
@@ -88,7 +88,7 @@ def _format_params(call: ast.Call) -> set[str]:
return params
-@register(ast.Call)
+# @register(ast.Call)
def visit_Call(
state: State,
node: ast.Call,
diff --git i/pyupgrade/_plugins/open_mode.py w/pyupgrade/_plugins/open_mode.py
index a20b95c..0388781 100644
--- i/pyupgrade/_plugins/open_mode.py
+++ w/pyupgrade/_plugins/open_mode.py
@@ -28,7 +28,7 @@ def _permute(*args: str) -> tuple[str, ...]:
return tuple(''.join(p) for s in args for p in itertools.permutations(s))
-MODE_REMOVE = frozenset(_permute('U', 'r', 'rU', 'rt'))
+MODE_REMOVE = frozenset(_permute('U', 'rU', 'rt'))
MODE_REPLACE_R = frozenset(_permute('Ub'))
MODE_REMOVE_T = frozenset(_plus(_permute('at', 'rt', 'wt', 'xt')))
MODE_REMOVE_U = frozenset(_permute('rUb'))
Then run with:
git ls-files | grep -E '(\.py|misc/userscripts)' | xargs ~/tmp/pyupgrade/.venv/bin/pyupgrade --py38-plus
And manually reverted some changes (e.g. it picking up bash userscripts)
2023-06-26 14:39:54 +02:00
Florian Bruhin
93c7fdd60c
Initial Python 3.7 drop
2023-06-26 14:39:54 +02:00
Florian Bruhin
b9855b9104
Fix keyring changelog URL
2023-06-26 14:03:00 +02:00
Florian Bruhin
86a83240b9
Update broken userscript links
2023-06-26 13:55:45 +02:00
Florian Bruhin
6baa6dea26
Migrate :print --pdf to pathlib
2023-06-26 13:50:19 +02:00
Florian Bruhin
9e9b57772e
tests: Resurrect :print --pdf test
2023-06-26 13:50:19 +02:00
Florian Bruhin
e15223211c
Fix :print --pdf with subdirectories
...
Fixes #5160
2023-06-26 13:50:19 +02:00
toofar
f1d4f248b3
Merge pull request #7758 from qutebrowser/update-dependencies
...
Update dependencies
2023-06-26 18:56:18 +12:00
toofar
937cfa41ad
Pin for 3.8 and changelog URL for jaraco.functools
2023-06-26 18:01:15 +12:00
qutebrowser bot
faa8091c65
Update dependencies
2023-06-26 04:22:20 +00:00
Florian Bruhin
48ea86fcb5
Rename some qt6 FIXMEs
...
Not relevant for v3 and qt6
2023-06-25 23:32:59 +02:00
Florian Bruhin
036af85199
Revert "Work around Python 3.12 test issues"
...
Fixed with newest PyQt snapshot.
This reverts commit c62e9aba5b .
2023-06-25 21:48:12 +02:00
Florian Bruhin
28f437c214
Revert "tests: Add a test for implicit Qt init"
...
This reverts commit 220337f870 .
Has various side-effects during tests due to global state.
2023-06-24 20:44:53 +02:00
Florian Bruhin
408e16917e
ci: Kill remaining qt6-v2 references
2023-06-24 01:05:25 +02:00
Florian Bruhin
220337f870
tests: Add a test for implicit Qt init
2023-06-23 23:28:57 +02:00
Florian Bruhin
ef3d5084e8
Merge pull request #7749 from qutebrowser/update-dependencies
...
Update dependencies
2023-06-19 17:35:24 +02:00
Florian Bruhin
a7e6242fd6
Update changelog URLs
2023-06-19 17:35:10 +02:00
qutebrowser bot
a7282f6235
Update dependencies
2023-06-19 04:22:17 +00:00
Florian Bruhin
080ce36451
tests: Update warning ignores
2023-06-16 11:50:07 +02:00
Florian Bruhin
e97bcff9dc
scripts: Allow --pyqt-version in mkvenv with --pyqt-type wheels
...
To adjust which version to use for the smoketest
2023-06-15 16:30:24 +02:00
Florian Bruhin
89b81c4b3a
tests: Widen xfail range for ELF to Qt 6.6+
2023-06-15 16:24:21 +02:00
Florian Bruhin
665cbfc45a
scripts: Check if PyQt wheels directory exists
2023-06-15 15:41:59 +02:00
Florian Bruhin
336da49aa8
Update docs
2023-06-15 00:43:37 +02:00
Florian Bruhin
e8ed81d9e5
Merge pull request #7741 from qutebrowser/better-qt-wrappers
...
Resolve remaining Qt wrapper selection UX issues
2023-06-14 20:04:52 +02:00
Florian Bruhin
d6af539454
qt: Use warning instead if Qt was already imported
2023-06-14 19:09:58 +02:00
Florian Bruhin
69c21a5751
qt: Use outcomes dict instead of attributes for SelectionInfo
2023-06-14 19:03:34 +02:00
Florian Bruhin
54aef75a29
qt: Sort wrappers in SelectionInfo correctly
2023-06-14 19:03:34 +02:00
Florian Bruhin
9b34a165f5
qt: Improve backendproblem messages
2023-06-14 19:03:34 +02:00
Florian Bruhin
5be71197d1
qt: Allow opt-in to autoselection and enable tests
2023-06-14 19:03:34 +02:00
Florian Bruhin
030712b36a
qt: Don't call _set_globals if wrapper is None
2023-06-13 20:19:38 +02:00
Florian Bruhin
b9253c90fe
qt: Improve SelectionInfo.__str__()
2023-06-13 20:13:06 +02:00