Skip to content

Commit 16bcbc3

Browse files
committed
Merge pull request python-mode#601 from wilywampa/new_buffer
Fix running lint on buffer without existing file
2 parents c27e9c5 + 26f96fd commit 16bcbc3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pymode/lint.py

+3-4
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)