pyproject.toml 1.8 KB

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