settings.json 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {
  2. // "python.pythonPath": "/usr/bin/python3",
  3. "python.defaultInterpreterPath": "/usr/local/python3.8/bin/python3",
  4. "python.formatting.provider": "yapf",
  5. "python.formatting.yapfArgs": [
  6. "--style",
  7. "{column_limit: 150}"
  8. ],
  9. "pylint.args": [
  10. "--extension-pkg-allow-list=pydantic", // from pydantic import BaseModel 报缺失
  11. "--function-naming-style=any", // 不限制函数名 命名规范
  12. "--argument-naming-style=any", // 不限制参数名 命名规范
  13. "--variable-naming-style=any", // 不限制变量名 命名规范
  14. "--attr-naming-style=any", // 不限制属性名 命名规范
  15. "--method-naming-style=any", // 不限制方法名 命名规范
  16. "--const-naming-style=any", // 不限制常量名 命名规范
  17. "--module-naming-style=any", // 不限制模块名 命名规范
  18. "--max-line-length=500", // 单行最大长度
  19. "--disable=C0116", // 忽略函数注释 missing-function-docstring
  20. "--disable=C0115", // 忽略类注释 missing-class-docstring
  21. "--disable=R0914", // 函数或方法有太多局部变量 too-many-locals
  22. "--disable=R0913", // 函数或方法接受太多参数 too-many-arguments
  23. "--disable=W0603", // 使用全局变量 global-statement
  24. "--disable=R0912", // 函数或方法有太多分支 too-many-branches
  25. "--disable=R0903", // 类的公共方法太少 too-few-public-methods
  26. "--disable=R0902", // 当类有太多实例属性时使用,尝试减少该属性以获得更简单 too-many-instance-attributes
  27. // "--disable=W1514", // 使用 open 而不明确指定编码 unspecified-encoding
  28. "--disable=W0703" // 捕获过于笼统的异常 broad-except
  29. ],
  30. "python.testing.pytestArgs": [
  31. ".",
  32. "-s",
  33. "-v"
  34. ],
  35. "python.testing.unittestEnabled": false,
  36. "python.testing.pytestEnabled": true
  37. // "python.analysis.extraPaths": ["data-fastq", "data-fastq/utils"] // import 当前目录python文件 报错
  38. }