我一直在try 配置我的.pylintrc
文件,以强制使用单引号并禁用文件末尾的换行符.我已经阅读了可用的文档,并试图找到堆栈溢出的解决方案,但我找不到明确的答案.
错误:
当我使用下面提供的配置运行时,我遇到以下错误.
.pylintrc:1:0: E0015: Unrecognized option found: quotes, missing-final-newline (unrecognized-option)
代码:
以下是我当前的.pylintrc
文件的片段:
[FORMAT]
# Attempt to set single quotes (this causes errors)
quotes = single
# Attempt to disable newline at the end of the file (this causes errors)
missing-final-newline = False
我不确定它的配置是否正确.
环境:
- 操作系统:Windows 10
- Pylint版本:3.0.3
- Python版本:3.11.4
预期输出:
我希望Pylint在我的代码中强制使用单引号,并且不在文件末尾插入换行符.
其他信息:
我试图在Pylint文档中查找信息,但在.pylintrc
文件中找不到这些特定设置的详细信息.我还搜索了Stack Overflow,并试图通过与ChatGPT的交互来解决该问题.