Skip to content

Commit

Permalink
Merge pull request #71 from almarklein/relativeimports
Browse files Browse the repository at this point in the history
PR: Use relative imports so its vendored more easily
  • Loading branch information
Nodd committed Sep 20, 2016
2 parents 3a61276 + 3b79ddd commit 088c58e
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion qtpy/QtCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Provides QtCore classes and functions.
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from . import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtDesigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Provides QtDesigner classes and functions.
"""

from qtpy import PYQT5, PYQT4, PythonQtError
from . import PYQT5, PYQT4, PythonQtError


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
the ``PyQt5.QtGui`` module.
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from . import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
Expand Down
6 changes: 3 additions & 3 deletions qtpy/QtMultimedia.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from qtpy import PYQT5
from qtpy import PYQT4
from qtpy import PYSIDE
from . import PYQT5
from . import PYQT4
from . import PYSIDE


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Provides QtNetwork classes and functions.
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from . import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtPrintSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Provides QtPrintSupport classes and functions.
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from . import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtSvg.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""Provides QtSvg classes and functions."""

# Local imports
from qtpy import PYQT4, PYQT5, PYSIDE, PythonQtError
from . import PYQT4, PYQT5, PYSIDE, PythonQtError

if PYQT5:
from PyQt5.QtSvg import (QGraphicsSvgItem, QSvgGenerator, QSvgRenderer,
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Provides QtTest and functions
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from . import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/QtWebEngineWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Provides QtWebEngineWidgets classes and functions.
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from . import PYQT5, PYQT4, PYSIDE, PythonQtError


# To test if we are using WebEngine or WebKit
Expand Down
6 changes: 3 additions & 3 deletions qtpy/QtWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
were the ``PyQt5.QtWidgets`` module.
"""

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
from qtpy._patch.qcombobox import patch_qcombobox
from qtpy._patch.qheaderview import introduce_renamed_methods_qheaderview
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
from ._patch.qcombobox import patch_qcombobox
from ._patch.qheaderview import introduce_renamed_methods_qheaderview


if PYQT5:
Expand Down
2 changes: 1 addition & 1 deletion qtpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import os

# Version of QtPy
from qtpy._version import __version__
from ._version import __version__

#: Qt API environment variable name
QT_API = 'QT_API'
Expand Down
4 changes: 2 additions & 2 deletions qtpy/_patch/qcombobox.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def patch_qcombobox(QComboBox):
using PyQt4 and PySide to avoid issues.
"""

from qtpy.QtGui import QIcon
from qtpy.QtCore import Qt, QObject
from ..QtGui import QIcon
from ..QtCore import Qt, QObject

class userDataWrapper():
"""
Expand Down
8 changes: 4 additions & 4 deletions qtpy/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import sys
import collections

from qtpy import PYQT4
from qtpy.QtWidgets import QFileDialog
from qtpy.py3compat import is_text_string, to_text_string, TEXT_TYPES
from . import PYQT4
from .QtWidgets import QFileDialog
from .py3compat import is_text_string, to_text_string, TEXT_TYPES


# =============================================================================
Expand Down Expand Up @@ -105,7 +105,7 @@ def _qfiledialog_wrapper(attr, parent=None, caption='', basedir='',
options = QFileDialog.Options(0)
try:
# PyQt <v4.6 (API #1)
from qtpy.QtCore import QString
from .QtCore import QString
except ImportError:
# PySide or PyQt >=v4.6
QString = None # analysis:ignore
Expand Down
4 changes: 2 additions & 2 deletions qtpy/uic.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from qtpy import PYSIDE, PYQT4, PYQT5
from qtpy.QtWidgets import QComboBox
from . import PYSIDE, PYQT4, PYQT5
from .QtWidgets import QComboBox

__all__ = ['loadUi']

Expand Down

0 comments on commit 088c58e

Please sign in to comment.