瀏覽代碼

Don't spell `# pylint: *` and `# noqa` inline comments

Pedro Algarvio 10 年之前
父節點
當前提交
b072b7aa74
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. 5
    0
      syntax/python.vim

+ 5
- 0
syntax/python.vim 查看文件

@@ -91,7 +91,12 @@ syn match   pythonDecorator	"@" display nextgroup=pythonFunction skipwhite
91 91
 syn match   pythonFunction
92 92
       \ "\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained
93 93
 
94
+" Add spelling to comments with some exceptions
94 95
 syn match   pythonComment	"#.*$" contains=pythonTodo,@Spell
96
+" Skip for PyLint's in-line comment rules
97
+syn match   pythonComment	"# pylint:.*$" display contains=@NoSpell
98
+" Skip noqa inline comments
99
+syn match   pythonComment	"# noqa.*$" display contains=@NoSpell
95 100
 syn keyword pythonTodo		FIXME NOTE NOTES TODO XXX contained
96 101
 
97 102
 " Triple-quoted strings can contain doctests.