mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] move the flake8 config to an external file
This commit is contained in:
parent
f8c01686ee
commit
c12afbc6ff
2 changed files with 13 additions and 14 deletions
|
@ -1,19 +1,6 @@
|
|||
let g:coc_global_extensions += ['coc-pyright']
|
||||
let g:coc_filetypes += ['python']
|
||||
|
||||
let s:ignored_errors = []
|
||||
" Indent is not a multiple of 4
|
||||
let s:ignored_errors += ['E111']
|
||||
" Indent is not a multiple of 4 for comments
|
||||
let s:ignored_errors += ['E114']
|
||||
" Indent for continuation lines is smaller than expected
|
||||
let s:ignored_errors += ['E121']
|
||||
" Import not at the top of the file
|
||||
let s:ignored_errors += ['E402']
|
||||
" Line too long
|
||||
let s:ignored_errors += ['E501']
|
||||
|
||||
" let g:coc_user_config['pyls.plugins.pycodestyle.ignore'] = s:ignored_errors
|
||||
" let g:coc_user_config['python.autocomplete.showAdvancedMembers'] = v:false
|
||||
let g:coc_user_config['python'] = {
|
||||
\ 'formatting': {
|
||||
|
@ -23,6 +10,6 @@ let g:coc_user_config['python'] = {
|
|||
\ 'linting': {
|
||||
\ 'pylintEnabled': v:false,
|
||||
\ 'flake8Enabled': v:true,
|
||||
\ 'flake8Args': ['--ignore=' . join(s:ignored_errors, ',')],
|
||||
\ 'flake8Args': ['--config=' . simplify(g:nvim_dotfiles_dir.'/../python/flake8.ini')],
|
||||
\ },
|
||||
\ }
|
||||
|
|
12
python/flake8.ini
Normal file
12
python/flake8.ini
Normal file
|
@ -0,0 +1,12 @@
|
|||
[flake8]
|
||||
ignore =
|
||||
# Indent is not a multiple of 4
|
||||
E111
|
||||
# Indent is not a multiple of 4 for comments
|
||||
E114
|
||||
# Indent for continuation lines is smaller than expected
|
||||
E121
|
||||
# Import not at the top of the file
|
||||
E402
|
||||
# Line too long
|
||||
E501
|
Loading…
Reference in a new issue