【问题标题】:pylint - String statement has no effect (pointless-string-statement) for Module doc stringpylint - 字符串语句对模块文档字符串没有效果(无意义的字符串语句)
【发布时间】: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 是对的,但要确保在第一次导入和无意义字符串语句消息的实际行和列之前,您可以显示文件中的所有内容吗?

标签: python pylint


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-08
  • 1970-01-01
  • 2020-08-14
  • 2021-05-03
  • 2017-01-08
  • 2018-03-09
相关资源
最近更新 更多