Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita9afe07

Browse files
committed
Update pylama
1 parent322da79 commita9afe07

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎pylibs/pylama/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
"""
77

8-
version_info=1,5,2
8+
version_info=1,5,3
99

1010
__version__=version='.'.join(map(str,version_info))
1111
__project__=__name__

‎pylibs/pylama/core.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def run(path, ignore=None, select=None, linters=DEFAULT_LINTERS, config=None,
3434
"""
3535
errors= []
3636
params=dict(ignore=ignore,select=select)
37-
37+
code=None
3838
try:
3939
withopen(path,'rU')asf:
4040
code=f.read()+'\n\n'
@@ -66,21 +66,22 @@ def run(path, ignore=None, select=None, linters=DEFAULT_LINTERS, config=None,
6666

6767
exceptIOErrorase:
6868
errors.append(dict(
69-
lnum=0,type='E',col=0,text=str(e)
70-
))
69+
lnum=0,type='E',col=0,text=str(e),filename=pathor''))
7170

7271
exceptSyntaxErrorase:
7372
errors.append(dict(
7473
lnum=e.linenoor0,type='E',col=e.offsetor0,
75-
text=e.args[0]+' [%s]'%lint
74+
text=e.args[0]+' [%s]'%lint,filename=pathor''
7675
))
7776

7877
exceptException:
7978
importtraceback
8079
logging.debug(traceback.format_exc())
8180

8281
errors= [erforerinerrorsiffilter_errors(er,**params)]
83-
errors=filter_skiplines(code,errors)
82+
83+
ifcode:
84+
errors=filter_skiplines(code,errors)
8485

8586
returnsorted(errors,key=lambdax:x['lnum'])
8687

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp