diff options
| -rw-r--r-- | mesonbuild/modules/qt4.py | 12 | ||||
| -rw-r--r-- | mesonbuild/modules/qt5.py | 12 | ||||
| -rw-r--r-- | mesonbuild/modules/qt6.py | 11 | ||||
| -rwxr-xr-x | run_mypy.py | 3 |
4 files changed, 29 insertions, 9 deletions
diff --git a/mesonbuild/modules/qt4.py b/mesonbuild/modules/qt4.py index b8948f7f4..6bdf1c51d 100644 --- a/mesonbuild/modules/qt4.py +++ b/mesonbuild/modules/qt4.py @@ -12,17 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations +import typing as T + from .qt import QtBaseModule from . import ModuleInfo +if T.TYPE_CHECKING: + from ..interpreter import Interpreter + class Qt4Module(QtBaseModule): INFO = ModuleInfo('qt4') - def __init__(self, interpreter): + def __init__(self, interpreter: Interpreter): QtBaseModule.__init__(self, interpreter, qt_version=4) -def initialize(*args, **kwargs): - return Qt4Module(*args, **kwargs) +def initialize(interp: Interpreter) -> Qt4Module: + return Qt4Module(interp) diff --git a/mesonbuild/modules/qt5.py b/mesonbuild/modules/qt5.py index 3933ea033..d9f0a5ecd 100644 --- a/mesonbuild/modules/qt5.py +++ b/mesonbuild/modules/qt5.py @@ -12,17 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations +import typing as T + from .qt import QtBaseModule from . import ModuleInfo +if T.TYPE_CHECKING: + from ..interpreter import Interpreter + class Qt5Module(QtBaseModule): INFO = ModuleInfo('qt5') - def __init__(self, interpreter): + def __init__(self, interpreter: Interpreter): QtBaseModule.__init__(self, interpreter, qt_version=5) -def initialize(*args, **kwargs): - return Qt5Module(*args, **kwargs) +def initialize(interp: Interpreter) -> Qt5Module: + return Qt5Module(interp) diff --git a/mesonbuild/modules/qt6.py b/mesonbuild/modules/qt6.py index 66fc43f27..cafc531af 100644 --- a/mesonbuild/modules/qt6.py +++ b/mesonbuild/modules/qt6.py @@ -12,17 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations +import typing as T + from .qt import QtBaseModule from . import ModuleInfo +if T.TYPE_CHECKING: + from ..interpreter import Interpreter class Qt6Module(QtBaseModule): INFO = ModuleInfo('qt6', '0.57.0') - def __init__(self, interpreter): + def __init__(self, interpreter: Interpreter): QtBaseModule.__init__(self, interpreter, qt_version=6) -def initialize(*args, **kwargs): - return Qt6Module(*args, **kwargs) +def initialize(interp: Interpreter) -> Qt6Module: + return Qt6Module(interp) diff --git a/run_mypy.py b/run_mypy.py index 119ee39d7..cb974f312 100755 --- a/run_mypy.py +++ b/run_mypy.py @@ -51,6 +51,9 @@ modules = [ 'mesonbuild/modules/modtest.py', 'mesonbuild/modules/pkgconfig.py', 'mesonbuild/modules/qt.py', + 'mesonbuild/modules/qt4.py', + 'mesonbuild/modules/qt5.py', + 'mesonbuild/modules/qt6.py', 'mesonbuild/modules/rust.py', 'mesonbuild/modules/sourceset.py', 'mesonbuild/modules/wayland.py', |
