【发布时间】:2022-11-05 10:54:53
【问题描述】:
请告知如何解决 pylint 抱怨。
pylint 为模块文件顶部的 doc 字符串抱怨 String statement has no effect (pointless-string-statement)。
"""Utilities for the online realtime model serving.
Consider the latency of the serving response
"""
如果删除它,请投诉1, 0: Missing module docstring (missing-module-docstring)。
环境
$ python --version
Python 3.7.9
$ pylint --version
pylint 2.14.4
astroid 2.11.6
Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08)
[Clang 6.0 (clang-600.0.57)]
$ pip install pylint --upgrade
No update occurs
【问题讨论】:
-
听起来您在文件顶部有多个字符串 - 只有第一个才算作文档字符串。
-
我认为 Jason 是对的,但要确保在第一次导入和无意义字符串语句消息的实际行和列之前,您可以显示文件中的所有内容吗?