settings.json 2.0 KB

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