Skip to content

Commit e0c35b7

Browse files
Fix quick_dock panel colors
And get rid of docutils, the html output is not always readable, installing docutils on python3 is a pain We should probably try to find an alternative but this is good enough for me.
1 parent 1ecc329 commit e0c35b7

3 files changed

Lines changed: 5 additions & 32 deletions

File tree

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ pyqode.python depends on the following libraries:
6464
- jedi
6565
- pep8
6666
- frosted
67-
- docutils
6867

6968
Installation
7069
------------

pyqode/python/panels/quick_doc.py

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"""
33
Contains the quick documentation panel
44
"""
5-
from docutils.core import publish_parts
65
from pyqode.core import icons
7-
from pyqode.qt import QtCore, QtGui, QtWidgets
8-
from pyqode.core.api import Panel, TextHelper, CodeEdit
6+
from pyqode.qt import QtCore, QtWidgets
7+
from pyqode.core.api import Panel, TextHelper
98
from pyqode.python.backend.workers import quick_doc
109

1110

@@ -62,8 +61,6 @@ def __init__(self):
6261

6362
def _reset_stylesheet(self):
6463
p = self.text_edit.palette()
65-
p.setColor(p.Base, self.editor.palette().toolTipBase().color())
66-
p.setColor(p.Text, self.editor.palette().toolTipText().color())
6764
self.text_edit.setPalette(p)
6865

6966
def on_install(self, editor):
@@ -98,29 +95,7 @@ def _on_results_available(self, results):
9895
self.setVisible(True)
9996
if len(results) and results[0] != '':
10097
string = '\n\n'.join(results)
101-
string = publish_parts(
102-
string, writer_name='html',
103-
settings_overrides={'output_encoding': 'unicode'})[
104-
'html_body']
105-
string = string.replace('colspan="2"', 'colspan="0"')
106-
string = string.replace('<th ', '<th align="left" ')
107-
string = string.replace(
108-
'</tr>\n<tr class="field"><td>&nbsp;</td>', '')
109-
if string:
110-
skip_error_msg = False
111-
lines = []
112-
for l in string.splitlines():
113-
if (l.startswith('<div class="system-message"') or
114-
l.startswith(
115-
'<div class="last system-message"')):
116-
skip_error_msg = True
117-
continue
118-
if skip_error_msg:
119-
if l.endswith('</div>'):
120-
skip_error_msg = False
121-
else:
122-
lines.append(l)
123-
self.text_edit.setText('\n'.join(lines))
124-
return
98+
self.text_edit.setText(string)
99+
return
125100
else:
126101
self.text_edit.setText('Documentation not found')

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def readme():
3535
'pyqode.core',
3636
'jedi',
3737
'pep8',
38-
'pyflakes',
39-
'docutils'
38+
'pyflakes'
4039
]
4140

4241
setup(

0 commit comments

Comments
 (0)