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

Commita87f789

Browse files
committed
Replace pep8 with pycodestyle
For more info see:#1170 (comment)
1 parenta4731b4 commita87f789

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

‎doc/pymode.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Manually set breakpoint command (leave empty for automatic detection)
293293
3. Code checking~
294294
*pymode-lint*
295295

296-
Pymode supports`pylint`,`pep257`,`pep8`,`pyflakes`,`mccabe` code
296+
Pymode supports`pylint`,`pep257`,`pycodestyle`,`pyflakes`,`mccabe` code
297297
checkers. You could run several similar checkers.
298298

299299
Pymode uses Pylama library for code checking. Many options like skip
@@ -330,9 +330,9 @@ Show error message if cursor placed at the error line *'g:pymode_lint_message'
330330
331331
Default code checkers (you could set several)*'g:pymode_lint_checkers'*
332332
>
333-
let g:pymode_lint_checkers = ['pyflakes', 'pep8', 'mccabe']
333+
let g:pymode_lint_checkers = ['pyflakes', 'pycodestyle', 'mccabe']
334334
335-
Values may be chosen from:`pylint`,`pep8`,`mccabe`,`pep257`,`pyflakes`.
335+
Values may be chosen from:`pylint`,`pycodestyle`,`mccabe`,`pep257`,`pyflakes`.
336336

337337
Skip errors and warnings*'g:pymode_lint_ignore'*
338338
E.g. ["W", "E2"] (Skip all Warnings and the Errors starting with E2) etc.
@@ -376,9 +376,9 @@ Definitions for |signs|
376376

377377
Pymode has the ability to set code checkers options from pymode variables:
378378

379-
Set PEP8 options*'g:pymode_lint_options_pep8'*
379+
Set PEP8 options*'g:pymode_lint_options_pycodestyle'*
380380
>
381-
let g:pymode_lint_options_pep8 =
381+
let g:pymode_lint_options_pycodestyle =
382382
\ {'max_line_length': g:pymode_options_max_line_length}
383383
384384
Seehttps://pep8.readthedocs.org/en/1.4.6/intro.html#configuration for more

‎plugin/pymode.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ call pymode#default("g:pymode_lint_on_fly", 0)
122122
" Show message about error in command line
123123
callpymode#default("g:pymode_lint_message",1)
124124

125-
" Choices are: pylint, pyflakes,pep8, mccabe and pep257
126-
callpymode#default("g:pymode_lint_checkers", ['pyflakes','pep8','mccabe'])
125+
" Choices are: pylint, pyflakes,pycodestyle, mccabe and pep257
126+
callpymode#default("g:pymode_lint_checkers", ['pyflakes','pycodestyle','mccabe'])
127127

128128
" Skip errors and warnings (e.g. E4,W)
129129
callpymode#default("g:pymode_lint_ignore", [])
@@ -152,8 +152,8 @@ call pymode#default("g:pymode_lint_info_symbol", "II")
152152
callpymode#default("g:pymode_lint_pyflakes_symbol","FF")
153153

154154
" Code checkers options
155-
" TODO: check if most adequate name name ispep8 orpycodestyle.
156-
callpymode#default("g:pymode_lint_options_pep8",
155+
" TODO: check if most adequate name name is pycodestyle.
156+
callpymode#default("g:pymode_lint_options_pycodestyle",
157157
\{'max_line_length':g:pymode_options_max_line_length})
158158

159159
callpymode#default("g:pymode_lint_options_pylint",

‎pymode/lint.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ def code_check():
4242
raiseValueError('g:pymode_lint_select should have a list type')
4343
else:
4444
select=env.var('g:pymode_lint_select')
45+
if'pep8'inlinters:
46+
# TODO: Add a user visible deprecation warning here
47+
env.message('pep8 linter is deprecated, please use pycodestyle.')
48+
linters.remove('pep8')
49+
linters.append('pycodestyle')
50+
4551
options=parse_options(
4652
linters=linters,force=1,
4753
ignore=ignore,

‎tests/utils/pymoderc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let g:pymode_lint_on_write = 1
2525
let g:pymode_lint_unmodified = 0
2626
let g:pymode_lint_on_fly = 0
2727
let g:pymode_lint_message = 1
28-
let g:pymode_lint_checkers = ['pyflakes', 'pep8','mccabe']
28+
let g:pymode_lint_checkers = ['pyflakes','pycodestyle','mccabe']
2929
let g:pymode_lint_ignore = ["E501", "W",]
3030
let g:pymode_lint_select = ["E501", "W0011", "W430"]
3131
let g:pymode_lint_sort = []
@@ -37,7 +37,7 @@ let g:pymode_lint_visual_symbol = 'RR'
3737
let g:pymode_lint_error_symbol = 'EE'
3838
let g:pymode_lint_info_symbol = 'II'
3939
let g:pymode_lint_pyflakes_symbol = 'FF'
40-
let g:pymode_lint_options_pep8 =
40+
let g:pymode_lint_options_pycodestyle =
4141
\ {'max_line_length': g:pymode_options_max_line_length}
4242
let g:pymode_lint_options_pyflakes = {'builtins': '_' }
4343
let g:pymode_lint_options_mccabe = {'complexity': 12 }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp