File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ install:
1717 # Prevent Python 2.7 from using the non-3to2 converted code.
1818 - mv language_check .language_check
1919
20+ - pip install pycodestyle pylint rstcheck
21+
2022script :
2123 - ./test.py
2224
@@ -29,3 +31,6 @@ script:
2931 - echo 'This is a sentence.' > foo.txt
3032 - language-check foo.txt
3133 - language-check --version
34+
35+ - mv .language_check language_check
36+ - if [[ "$TRAVIS_PYTHON_VERSION" == "3.5" ]]; then make check; fi
Original file line number Diff line number Diff line change 11check :
22 pycodestyle \
3+ --exclude ./language_check/LanguageTool-* \
34 --ignore=E402 \
45 ./language-check \
56 ./language_check/ \
2122 --disable=similarities \
2223 --disable=too-few-public-methods \
2324 --disable=too-many-branches \
25+ --disable=too-many-instance-attributes \
2426 --disable=too-many-locals \
2527 --disable=too-many-statements \
2628 --disable=wrong-import-order \
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ def main():
106106
107107 remote_server = None
108108 if args .remote_host is not None and args .remote_port is not None :
109- remote_server = {'host' : args .remote_host , 'port' : args .remote_port }
109+ remote_server = {'host' : args .remote_host ,
110+ 'port' : args .remote_port }
110111 lang_tool = LanguageTool (
111112 motherTongue = args .mother_tongue ,
112113 remote_server = remote_server ,
Original file line number Diff line number Diff line change @@ -192,10 +192,10 @@ def split_multiline(value):
192192
193193def split_elements (value ):
194194 """Split a string with comma or space-separated elements into a list."""
195- l = [v .strip () for v in value .split (',' )]
196- if len (l ) == 1 :
197- l = value .split ()
198- return l
195+ items = [v .strip () for v in value .split (',' )]
196+ if len (items ) == 1 :
197+ items = value .split ()
198+ return items
199199
200200
201201def eval_environ (value ):
@@ -541,7 +541,7 @@ def copy_data(src, dst):
541541 try :
542542 run_3to2 (copied_py_files )
543543 write_py2k_header (copied_py_files )
544- except :
544+ except Exception :
545545 shutil .rmtree (py2k_dir )
546546 raise
547547
You can’t perform that action at this time.
0 commit comments