modules: rename qt.py -> _qt.py

Since it's an implementation detail, and shouldn't be exposed. This also
helps give better error messages when a user writes `import('qt')`,
since otherwise you get an error about `qt doesn't have an initialize
method`, and now you get `qt module doesn't exist`.
pull/13066/head
Dylan Baker 8 months ago
parent ef2b164f1f
commit d617dc6869
  1. 0
      mesonbuild/modules/_qt.py
  2. 2
      mesonbuild/modules/qt4.py
  3. 2
      mesonbuild/modules/qt5.py
  4. 2
      mesonbuild/modules/qt6.py
  5. 2
      run_mypy.py
  6. 2
      unittests/datatests.py

@ -4,7 +4,7 @@
from __future__ import annotations
import typing as T
from .qt import QtBaseModule
from ._qt import QtBaseModule
from . import ModuleInfo
if T.TYPE_CHECKING:

@ -4,7 +4,7 @@
from __future__ import annotations
import typing as T
from .qt import QtBaseModule
from ._qt import QtBaseModule
from . import ModuleInfo
if T.TYPE_CHECKING:

@ -4,7 +4,7 @@
from __future__ import annotations
import typing as T
from .qt import QtBaseModule
from ._qt import QtBaseModule
from . import ModuleInfo
if T.TYPE_CHECKING:

@ -62,7 +62,7 @@ modules = [
'mesonbuild/modules/keyval.py',
'mesonbuild/modules/modtest.py',
'mesonbuild/modules/pkgconfig.py',
'mesonbuild/modules/qt.py',
'mesonbuild/modules/_qt.py',
'mesonbuild/modules/qt4.py',
'mesonbuild/modules/qt5.py',
'mesonbuild/modules/qt6.py',

@ -201,7 +201,7 @@ class DataTests(unittest.TestCase):
html = f.read().lower()
self.assertIsNotNone(html)
for f in Path('mesonbuild/modules').glob('*.py'):
if f.name in {'modtest.py', 'qt.py', '__init__.py'}:
if f.name.startswith('_') or f.name == 'modtest.py':
continue
name = f'{f.stem}-module.html'
name = name.replace('unstable_', '')

Loading…
Cancel
Save