【发布时间】:2020-11-09 12:24:26
【问题描述】:
鉴于此 html
<div class="img-background" style="background-image: url({% static '/img/information_juniors.jpg' %});">
<div class="content">
<h5>Juniors</h5>
<p>{{ page.juniors }}</p>
</div>
</div>
是否可以在 VS Code 中包含 django 标签的单行禁用 linting?
出现这些错误
) 预期 css-rparentexpected
预期分号 css-semicolonexpected
预期规则或选择器 css- ruleorselectorexpected
at-rule 或 selector 预期 css-ruleorselectorexpected
我的 args 有这个,但我找不到任何关于 linting 和 django 模板的信息
"python.linting.pylintArgs": [
"--load-plugins=pylint_django",
"--disable=C0111", // missing docstring
]
【问题讨论】:
-
你为什么要pylint和HTML文件?
pylint_django让pylint/astroid知道运行时生成的方法或属性 -
@rioV8 是的,那是我的错误。出于某种原因,vs code 最近开始在我的模板文件下划线并显示这些问题,所以我最初认为是
pylint_django插件之前停止了它并且可以在模板中关闭。
标签: django visual-studio-code wagtail