Pylint 嵌套 pylintrc :指定配置文件

发布于 2025-01-19 23:52:24 字数 461 浏览 3 评论 0原文

目标

我想使用pylint而不指定文件路径(只需运行Pylint而不是Pylint -rcfile = linter/.pylintrc),因为我想保存所有相关的Linter子文件夹中的文件linter/

我想到在根文件夹中添加.pylintrc文件仅重定向到实际配置文件linter/.pylintrc

探索

选项rcfile似乎是我想要的,它似乎并不是从子文件夹导入设置。我想念什么?

提出的.pylintrc用于重定向的文件:

[MASTER]
# Specify a configuration file.
rcfile=subfolder/.pylintrc

Goal

I want to use pylint without specifying the file path (just run pylint instead of pylint --rcfile=linter/.pylintrc), as I want to save all linter related files in a subfolder linter/.

I thought of adding a .pylintrc file at the root folder only a redirection to the actual config file linter/.pylintrc.

Exploration

The option rcfile seems to be what I look for, it doesn't seems to import the settings from the sub-folder. What am I missing ?

Proposed .pylintrc file for redirection:

[MASTER]
# Specify a configuration file.
rcfile=subfolder/.pylintrc

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

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

发布评论

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

评论(1

离去的眼神 2025-01-26 23:52:24

pylint 不支持此功能,请参阅此拉取请求

This is not supported in pylint see this pull request

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文