Pylint是否可以配置为以不同颜色突出显示Fixme警告?

huangapple go评论76阅读模式
英文:

Can Pylint be configured to color Fixme warnings differently?

问题

我希望我的fixme消息是蓝色的,而不是紫色的,以便将它们与其他紫色消息区分开来。

Pylint是否有颜色选项?我找不到任何信息。

我看到了一些被称为“格式化程序”的东西,但那听起来比我需要的要复杂。

(我可能会编写一个后处理脚本,在我考虑使用格式化程序之前,实时更改ANSI代码,因为后者更可能用于个人重用。我宁愿避免任何东西,只是在.plintrc中添加一个不错的选项)

Pylint是否可以配置为以不同颜色突出显示Fixme警告?

我尝试查看了文档、进行了谷歌搜索和使用ChatGPT,但似乎没有找到合适的选项。

英文:

I would like my fixme messages to be blue, instead of purple, to differentiate them from other purple messages.

Does Pylint even have colorization options? I can't find any.

I see these things called "formatters", but that sounds more complex than what I need.

(I'd probably write a postprocessing script that changes the ANSI codes on the fly before I'd bother with a formatter, because the latter is more likely for personal reuse. I'd rather avoid anything and just slip a nice option into .plintrc)

Pylint是否可以配置为以不同颜色突出显示Fixme警告?

I tried looking through the documentation, google search, and ChatGPT, but didn't seem to find a suitable option.

答案1

得分: 1

Pylint有一个彩色文本报告生成器,你可以基于它创建自己的报告生成器。使用方法如下;请参阅输出选项pylint --output-format=json:somefile.json,colorized

您需要注册您的自定义报告生成器以便使用它

英文:

Pylint has a colored text reporter that you could base your own reporter on. The way to use it is the following; see output options: pylint --output-format=json:somefile.json,colorized.

You will need to register your custom reporter to be able to use it

huangapple
  • 本文由 发表于 2023年5月28日 21:53:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76351830.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定