Skip to content

Commit ca2235a

Browse files
committed
Update pylama
1 parent 366b92b commit ca2235a

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

pylibs/pylama/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" pylama -- Python code audit. "
22

3-
version_info = (0, 2, 1)
3+
version_info = (0, 2, 2)
44

55
__version__ = version = '.'.join(map(str, version_info))
66
__project__ = __name__

pylibs/pylama/main.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import logging
21
import fnmatch
32
import re
43
import sys
5-
from argparse import ArgumentParser
64
from os import getcwd, walk, path as op
75

6+
import logging
7+
from argparse import ArgumentParser
8+
89
from . import utils
910

1011

@@ -37,16 +38,13 @@ def run(path, ignore=None, select=None, linters=default_linters, **meta):
3738

3839
if params.get('lint'):
3940
for e in linter(path, code=code, **meta):
40-
e.update(
41-
col=e.get('col', 0),
42-
lnum=e.get('lnum', 0),
43-
type=e.get('type', 'E'),
44-
text="{0} [{1}]".format(
45-
e.get('text', '').strip(
46-
).replace("'", "\"").split('\n')[0],
47-
lint),
48-
filename=path or '',
49-
)
41+
e['col'] = e.get('col') or 0
42+
e['lnum'] = e.get('lnum') or 0
43+
e['type'] = e.get('type') or 'E'
44+
e['text'] = "{0} [{1}]".format((e.get(
45+
'text') or '').strip()
46+
.replace("'", "\"").split('\n')[0], lint)
47+
e['filename'] = path or ''
5048
errors.append(e)
5149

5250
except IOError, e:

pylibs/pylama/pylint/lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
def _get_python_path(filepath):
7272
dirname = os.path.dirname(os.path.realpath(
73-
os.path.expanduser(filepath)))
73+
os.path.expanduser(filepath)))
7474
while True:
7575
if not os.path.exists(os.path.join(dirname, "__init__.py")):
7676
return dirname

0 commit comments

Comments
 (0)