python - 如何在 Google App Store Cloud Shell 中配置 pycodestyle

标签 python google-app-engine google-cloud-shell pycodestyle

昨天,我在 Google Cloud Shell 中的 python 脚本开始包含以下有关行长度的 pycodestyle 警告:

[pycodestyle] E501 行太长(85 > 79 个字符)

虽然一些警告/评论很有用,但有些只是烦人,我希望能够配置警告,例如将可接受的长度扩展为超过 79 个字符。是否可以包含 setup.cfg 或类似文件来配置这些警告,以及它需要位于 Cloud Shell 目录结构中的何处?

谢谢, 克里斯

最佳答案

是的,这是可能的。

您可以添加一个 ~/.config/pycodestyle 文件,其中包含以下内容:

[pycodestyle]
max-line-length = 100

还有其他选项,请参阅 Configuration .

关于python - 如何在 Google App Store Cloud Shell 中配置 pycodestyle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55297967/

相关文章:

python-3.x - 从在 Google Cloud Shell 中运行的 Python 打开浏览器

python - 录制和播放从麦克风录制的音频流

从目录在 SQL 中以 Pythonic 方式上传 CSV 文件,路径错误

python - HDF5存储数据的维度

python - App Engine HTTP 500s

javascript - 在 chrome 扩展中使用 channel google app engine

google-cloud-platform - GCP 云外壳错误 : No credentialed accounts

linux - 谷歌云外壳: How to interface via command-line terminal?

Python 扩展切片与列表 : is the documentation correct?

python - 我可以在 Google App Engine 上使用 Django 模板标签吗?