Skip to content

Commit

Permalink
Merge pull request #4 from astrofrog/fix-imports-in-qglue
Browse files Browse the repository at this point in the history
Fix imports of parse_data and parse_links
  • Loading branch information
astrofrog committed Aug 17, 2023
2 parents 83554b5 + 81ae62e commit 4539a0e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
26 changes: 17 additions & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'echo': ('https://echo.readthedocs.io/en/latest/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'PyQt5': ('https://www.riverbankcomputing.com/static/Docs/PyQt5/', None),
'glue': ('http://docs.glueviz.org/en/latest/', None),
'glue': ('http://glue-core.readthedocs.org/en/latest/', None),
}

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -135,14 +135,22 @@
('py:class', 'PyQt5.sip.voidptr'),
('py:class', 'PYQT_SLOT')]

nitpick_ignore_regex = [('py:class', r'PyQt5\.QtCore\.Q[A-Z][a-zA-Z]+'),
('py:class', r'PyQt5\.QtWidgets\.Q[A-Z][a-zA-Z]+'),
('py:class', r'PyQt6\.QtCore\.Q[A-Z][a-zA-Z]+'),
('py:class', r'PyQt6\.QtWidgets\.Q[A-Z][a-zA-Z]+'),
('py:class', r'Qt\.[A-Z][a-zA-Z]+'),
('py:class', r'QPalette\.[A-Z][a-zA-Z]+'),
('py:class', r'QWidget\.[A-Z][a-zA-Z]+'),
('py:class', r'Q[A-Z][a-zA-Z]+')]
nitpick_ignore_regex = [('py:class', r'PyQt5\.QtCore\.Q[a-zA-Z]+'),
('py:class', r'PyQt5\.QtGui\.Q[a-zA-Z]+'),
('py:class', r'PyQt5\.QtWidgets\.Q[a-zA-Z]+'),
('py:class', r'PyQt6\.QtCore\.Q[a-zA-Z]+'),
('py:class', r'PyQt6\.QtGui\.Q[a-zA-Z]+'),
('py:class', r'PyQt6\.QtWidgets\.Q[a-zA-Z]+'),
('py:class', r'PySide2\.QtCore\.Q[a-zA-Z]+'),
('py:class', r'PySide2\.QtGui\.Q[a-zA-Z]+'),
('py:class', r'PySide2\.QtWidgets\.Q[a-zA-Z]+'),
('py:class', r'PySide6\.QtCore\.Q[a-zA-Z]+'),
('py:class', r'PySide6\.QtGui\.Q[a-zA-Z]+'),
('py:class', r'PySide6\.QtWidgets\.Q[a-zA-Z]+'),
('py:class', r'Qt\.[a-zA-Z]+'),
('py:class', r'QPalette\.[a-zA-Z]+'),
('py:class', r'QWidget\.[a-zA-Z]+'),
('py:class', r'Q[a-zA-Z]+')]

# coax Sphinx into treating descriptors as attributes
# see https://bitbucket.org/birkenfeld/sphinx/issue/1254/#comment-7587063
Expand Down
8 changes: 1 addition & 7 deletions glue_qt/qglue.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
import sys
from contextlib import contextmanager

try:
from glue.core import BaseData, Data
from glue.core.cli_parsers import parse_data, parse_links
except ImportError:
# let qglue import, even though this won't work
# qglue will throw an ImportError
BaseData = Data = None
from glue.core.parsers import parse_data, parse_links


__all__ = ['qglue']
Expand Down

0 comments on commit 4539a0e

Please sign in to comment.