diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2022-02-02 18:01:34 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2022-02-02 18:24:08 +0100 |
commit | 3b2d2e67461d16c48a4066b2c8a9f6b7b3c869bd (patch) | |
tree | 78c4e1a2850980aecf03d729456d481c5546bb02 | |
parent | 978c562383c057d324ffed9926bfcd9cd86172db (diff) | |
download | gobject-introspection-3b2d2e67461d16c48a4066b2c8a9f6b7b3c869bd.tar.gz |
CI: use a newer mypy in CI to fix the msys2 job
MSYS2 recently updated Python to 3.9.10 which triggered a build
issued present in typed_ast, which was fixed in typed_ast 1.5.0:
https://github.com/python/typed_ast/issues/169
The currently used mypy version has an upper limit on typed_ast, so
this fixed version wasn't pulled in.
To fix this, update mypy, fix one new warning it complains about
(namedtuple not being named after the variable), and install the
markdown stubs explicitely, since mypy no longer bundles them.
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab-ci/test-msys2-meson.sh | 2 | ||||
-rw-r--r-- | giscanner/annotationparser.py | 12 |
3 files changed, 10 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55d05682..7aa002ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,7 +58,7 @@ fedora-x86_64-meson: - ninja -C _build gi-doc - mkdir -p public - mv _build/docs/reference/html/ public/girepository/ - - python3 -m pip install --user flake8 mypy==0.790 + - python3 -m pip install --user flake8 mypy==0.931 types-Markdown - python3 -m flake8 --count - python3 -m mypy _build except: diff --git a/.gitlab-ci/test-msys2-meson.sh b/.gitlab-ci/test-msys2-meson.sh index 5f1d507c..36ef95f2 100644 --- a/.gitlab-ci/test-msys2-meson.sh +++ b/.gitlab-ci/test-msys2-meson.sh @@ -30,7 +30,7 @@ pacman --noconfirm -S --needed \ export CCACHE_BASEDIR="${CI_PROJECT_DIR}" export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" -pip3 install --upgrade --user meson==0.58.2 flake8 mypy==0.790 +pip3 install --upgrade --user meson==0.58.2 flake8 mypy==0.931 types-Markdown export PATH="$HOME/.local/bin:$PATH" export CFLAGS="-Werror" diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 9bba315b..9fbcfe7d 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -1243,12 +1243,16 @@ class GtkDocCommentBlock(GtkDocAnnotatable): #: Result object returned by :class:`GtkDocCommentBlockParser`._parse_annotations() -_ParseAnnotationsResult = namedtuple('Result', ['success', 'annotations', 'annotations_changed', - 'start_pos', 'end_pos']) +_ParseAnnotationsResult = namedtuple( + '_ParseAnnotationsResult', + ['success', 'annotations', 'annotations_changed', + 'start_pos', 'end_pos']) #: Result object returned by :class:`GtkDocCommentBlockParser`._parse_fields() -_ParseFieldsResult = namedtuple('Result', ['success', 'annotations', 'annotations_changed', - 'description']) +_ParseFieldsResult = namedtuple( + '_ParseFieldsResult', + ['success', 'annotations', 'annotations_changed', + 'description']) class GtkDocCommentBlockParser(object): |