summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-06-14 12:19:25 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-06-14 12:19:25 +0200
commit698d2d6b8bb68d2b26ec4435b428457b5eba1deb (patch)
treeeb405ad39defdaa02f1b63c2764c1318777e5f41
parent41d488e11ad8be3c6c67cdb87ae223e80a03a4a6 (diff)
downloadqutebrowser-698d2d6b8bb68d2b26ec4435b428457b5eba1deb.tar.gz
qutebrowser-698d2d6b8bb68d2b26ec4435b428457b5eba1deb.zip
Add new types packages for mypy
See http://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
-rw-r--r--misc/requirements/requirements-mypy.txt2
-rw-r--r--misc/requirements/requirements-mypy.txt-raw3
-rw-r--r--qutebrowser/browser/webkit/http.py2
-rw-r--r--scripts/dev/recompile_requirements.py2
4 files changed, 8 insertions, 1 deletions
diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt
index 4c99e06b4..031362958 100644
--- a/misc/requirements/requirements-mypy.txt
+++ b/misc/requirements/requirements-mypy.txt
@@ -15,5 +15,7 @@ pluggy==0.13.1
Pygments==2.9.0
PyQt5-stubs==5.15.2.0
toml==0.10.2
+types-dataclasses==0.1.4
+types-PyYAML==0.1.8
typing-extensions==3.10.0.0
zipp==3.4.1
diff --git a/misc/requirements/requirements-mypy.txt-raw b/misc/requirements/requirements-mypy.txt-raw
index e93eaae0b..4baeec11f 100644
--- a/misc/requirements/requirements-mypy.txt-raw
+++ b/misc/requirements/requirements-mypy.txt-raw
@@ -1,7 +1,10 @@
mypy
lxml # For HTML reports
diff-cover
+
PyQt5-stubs
+types-dataclasses
+types-PyYAML
# So stubs are available even on newer Python versions
importlib_resources
diff --git a/qutebrowser/browser/webkit/http.py b/qutebrowser/browser/webkit/http.py
index 35cecd89a..eacb95679 100644
--- a/qutebrowser/browser/webkit/http.py
+++ b/qutebrowser/browser/webkit/http.py
@@ -64,7 +64,7 @@ class ContentDisposition:
# "duplicate ignored"), because even if we did ignore that one, it still wouldn't
# work properly...
_IGNORED_DEFECT = DefectWrapper(
- email.errors.InvalidHeaderDefect, # type: ignore[attr-defined]
+ email.errors.InvalidHeaderDefect,
'duplicate parameter name; duplicate ignored'
)
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index 5121bd27a..158741e5c 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -65,6 +65,8 @@ CHANGELOG_URLS = {
'glob2': 'https://github.com/miracle2k/python-glob2/blob/master/CHANGES',
'hypothesis': 'https://hypothesis.readthedocs.io/en/latest/changes.html',
'mypy': 'https://mypy-lang.blogspot.com/',
+ 'types-PyYAML': 'https://github.com/python/typeshed/commits/master/stubs/PyYAML',
+ 'types-dataclasses': 'https://github.com/python/typeshed/commits/master/stubs/dataclasses',
'pytest': 'https://docs.pytest.org/en/latest/changelog.html',
'iniconfig': 'https://github.com/RonnyPfannschmidt/iniconfig/blob/master/CHANGELOG',
'tox': 'https://tox.readthedocs.io/en/latest/changelog.html',