Skip to content

Commit 7795ab1

Browse files
committed
constants were moved in SL4
1 parent 3e0cd1e commit 7795ab1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

linter.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@
1313

1414
from contextlib import contextmanager
1515
from functools import partial
16-
from SublimeLinter.lint import PythonLinter, highlight, persist, util
16+
from SublimeLinter.lint import PythonLinter, persist, util
17+
18+
19+
import SublimeLinter
20+
if getattr(SublimeLinter.lint, 'VERSION', 3) > 3:
21+
from SublimeLinter.lint import const
22+
WARNING = const.WARNING
23+
else:
24+
from SublimeLinter.lint import highlight
25+
WARNING = highlight.WARNING
1726

1827

1928
class Pydocstyle(PythonLinter):
@@ -26,7 +35,7 @@ class Pydocstyle(PythonLinter):
2635
version_requirement = '>= 0.3.0'
2736
regex = r'^.+?:(?P<line>\d+).*:\r?\n\s*(?P<warning>D\d{3}):\s(?P<message>.+)$'
2837
multiline = True
29-
default_type = highlight.WARNING
38+
default_type = WARNING
3039
error_stream = util.STREAM_BOTH
3140
line_col_base = (1, 0) # uses one-based line and zero-based column numbers
3241
tempfile_suffix = 'py'

0 commit comments

Comments
 (0)