pyproject.toml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. [tool.ruff]
  2. exclude = [
  3. ".git",
  4. "__pycache__",
  5. "setup.py",
  6. "build",
  7. "dist",
  8. "releases",
  9. ".venv",
  10. ".mypy_cache",
  11. ".pytest_cache",
  12. ".vscode",
  13. ".github",
  14. ]
  15. line-length = 120
  16. indent-width = 4
  17. [tool.ruff.lint]
  18. select = [
  19. "E", # pycodestyle errors
  20. "F", # pyflakes errors
  21. "W", # pycodestyle warnings
  22. "C", # mccabe complexity checker
  23. "B", # bugbear best practices checker
  24. "T", # mypy type errors
  25. "B", # flake8-bugbear best practices checker
  26. "I001", # isort import order
  27. ]
  28. ignore = [ # TODO: to be removed
  29. "C401", # Unnecessary generator (rewrite as a `set` comprehension)
  30. "C405", # Unnecessary list literal - rewrite as a literal
  31. "C408", # Unnecessary dict call - rewrite as a literal
  32. "C409", # Unnecessary list passed to tuple() - rewrite as a tuple literal
  33. "C416", # Unnecessary `set` comprehension (rewrite using `set()`)
  34. ]
  35. # Allow fix for all enabled rules (when `--fix`) is provided.
  36. fixable = ["ALL"]
  37. unfixable = []
  38. [tool.ruff.lint.per-file-ignores]
  39. "__init__.py" = ["F401", "F403"] # unused import
  40. "_init.py" = ["F401", "F403"] # unused import
  41. "taipy/config/stubs/pyi_header.py" = ["F401", "F403"] # unused import
  42. "taipy/templates/*" = ["F401", "F403", "T201"] # unused import, `print` found
  43. [tool.ruff.lint.mccabe]
  44. max-complexity = 18
  45. [tool.ruff.lint.pydocstyle]
  46. convention = "google"
  47. [tool.mypy]
  48. ignore_missing_imports = true
  49. implicit_optional = true
  50. namespace_packages = false
  51. exclude = "(taipy/templates/|generate_pyi.py|tools)"
  52. follow_imports = "skip"
  53. [tool.pyright]
  54. [tool.codespell]
  55. skip = '.git,*.pdf,*.svg,go.sum,package-lock.json,*.css'
  56. check-hidden = true
  57. ignore-regex = '^\s*"image/\S+": ".*|\b(inPort|anId|IST|Opps|Rouge|notifAction)\b'
  58. # some unfortunate names for variables
  59. ignore-words-list = 'ags,selt'