如何添加定制的“好名字”像“斧头”一样Visual Studio 代码中的 pylintrc 设置?

发布于 2025-01-16 19:22:27 字数 202 浏览 4 评论 0原文

为了避免处理由于在绘图例程中使用变量ax而引发的警告,我想将其添加到我的good-name变量列表中Python。在 Linux(顺便说一句,它是最好的平台)中,这很容易做到。但是,我试图在安装在 Windows 10 上的 Visual Studio Code 中保留和维护我的代码。有谁知道如何在 Visual Studio Code 的“设置”中执行此任务?

In order to avoid dealing with warnings raised as a result of using the variable ax in plotting routines, I would like to add this to the list of good-name variables in my python. In Linux, which is the best platform by the way, this is easy to do. However, I am trying to keep and maintain my codes in visual studio code which is installed on a Windows 10. Does any one know how to do this task in the "settings" of the visual studio code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谜兔 2025-01-23 19:22:27

我使用 PyCharm 遇到了这样的情况,顺便说一句,这是最好的 IDE,而且问题只是避免使用空格分隔的好名称。

工作正常:

--check-quote-consistency
y
--logging-format-style
new
--max-line-length
120
--good-names
('i','j','k','x','y','s','c','el','a','b','t','l','of','df','pd','Entity')
--bad-names
('foo','bar','kek','KEK')
--disable
C0116
--disable
C0115
--disable
C0114

失败:

--check-quote-consistency
y
--logging-format-style
new
--max-line-length
120
--good-names
('i', 'j', 'k', 'x', 'y', 's', 'c', 'el', 'a', 'b', 't', 'l', 'of', 'df', 'pd', 'Entity')
--bad-names
"('foo', 'bar', 'kek', 'KEK')"
--disable
C0116
--disable
C0115
--disable
C0114

I met such a case using PyCharm, which is the best IDE by the way, And the thing was only in avoiding space-separated good-names.

Works fine:

--check-quote-consistency
y
--logging-format-style
new
--max-line-length
120
--good-names
('i','j','k','x','y','s','c','el','a','b','t','l','of','df','pd','Entity')
--bad-names
('foo','bar','kek','KEK')
--disable
C0116
--disable
C0115
--disable
C0114

Fails:

--check-quote-consistency
y
--logging-format-style
new
--max-line-length
120
--good-names
('i', 'j', 'k', 'x', 'y', 's', 'c', 'el', 'a', 'b', 't', 'l', 'of', 'df', 'pd', 'Entity')
--bad-names
"('foo', 'bar', 'kek', 'KEK')"
--disable
C0116
--disable
C0115
--disable
C0114
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文