8000 Try to fix #597 · python-mode/python-mode@33cc3c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 33cc3c0

Browse files
committed
Try to fix #597
1 parent af42681 commit 33cc3c0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

pymode/libs/logilab/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

pymode/libs/pylama/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:license: BSD, see LICENSE for more details.
66
"""
77

8-
__version__ = "7.0.3"
8+
__version__ = "7.0.4"
99
__project__ = "pylama"
1010
__author__ = "Kirill Klenov <horneds@gmail.com>"
1111
__license__ = "GNU LGPL"

pymode/libs/pylama/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ def run(path='', code=None, rootdir=CURDIR, options=None):
2121
"""
2222
errors = []
2323
fileconfig = dict()
24-
lname = 'undefined'
25-
params = dict()
2624
linters = LINTERS
2725
linters_params = dict()
26+
lname = 'undefined'
27+
params = dict()
28+
path = op.relpath(path, rootdir)
2829

2930
if options:
3031
linters = options.linters
@@ -35,7 +36,6 @@ def run(path='', code=None, rootdir=CURDIR, options=None):
3536

3637
try:
3738
with CodeContext(code, path) as ctx:
38-
path = op.relpath(path, rootdir)
3939
code = ctx.code
4040
params = prepare_params(parse_modeline(code), fileconfig, options)
4141
LOGGER.debug('Checking params: %s', params)
@@ -71,7 +71,7 @@ def run(path='', code=None, rootdir=CURDIR, options=None):
7171
Error(linter=lname, lnum=e.lineno, col=e.offset, text=e.args[0],
7272
filename=path))
7373

74-
except Exception as e:
74+
except Exception as e: # noqa
7575
import traceback
7676
LOGGER.info(traceback.format_exc())
7777

0 commit comments

Comments
 (0)
0