summaryrefslogtreecommitdiff
path: root/giscanner/annotationparser.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2020-11-07 11:00:30 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2020-11-07 11:10:01 +0100
commit1b3237ba383ba644628defcfde443e9a4e5af69c (patch)
treefff15e73a0c5973ee105b11301f021edd8320a51 /giscanner/annotationparser.py
parent3e5eece5e1e5d77d2c5ea355bc8637549388b9d5 (diff)
downloadgobject-introspection-1b3237ba383ba644628defcfde443e9a4e5af69c.tar.gz
Add basic mypy support
Silence some errors, run mypy in CI Adding annotations to functions/classes will make mypy check them.
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r--giscanner/annotationparser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index f8257206..267542f9 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -110,6 +110,7 @@ import os
import re
import operator
+from typing import Tuple
from operator import ne, gt, lt
from collections import namedtuple, Counter, OrderedDict
@@ -575,7 +576,7 @@ class GtkDocAnnotatable(object):
#: A :class:`tuple` of annotation name constants that are valid for this object. Annotation
#: names not in this :class:`tuple` will be reported as *unknown* by :func:`validate`. The
#: :attr:`valid_annotations` class attribute should be overridden by subclasses.
- valid_annotations = ()
+ valid_annotations = () # type: Tuple[str,...]
def __init__(self, position=None):
#: A :class:`giscanner.message.Position` instance specifying the location of the