8000 Fix running lint on buffer without existing file · python-mode/python-mode@26f96fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 26f96fd

Browse files
committed
Fix running lint on buffer without existing file
1 parent c27e9c5 commit 26f96fd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pymode/lint.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def code_check():
2020
"""
2121
with silence_stderr():
2222

23-
from pylama.main import parse_options, check_path
23+
from pylama.core import run
24+
from pylama.main import parse_options
2425

2526
if not env.curbuf.name:
2627
return env.stop()
@@ -54,9 +55,7 @@ def code_check():
5455
from pylama.core import LOGGER, logging
5556
LOGGER.setLevel(logging.DEBUG)
5657

57-
options.paths = [path]
58-
errors = check_path(
59-
options=options, code='\n'.join(env.curbuf) + '\n', rootdir=env.curdir)
58+
errors = run(path, code='\n'.join(env.curbuf) + '\n', options=options)
6059

6160
env.debug("Find errors: ", len(errors))
6261
sort_rules = env.var('g:pymode_lint_sort')

0 commit comments

Comments
 (0)
0