pyproject.toml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [build-system]
  2. requires = ['setuptools>=42']
  3. build-backend = 'setuptools.build_meta'
  4. [tool.pytest.ini_options]
  5. markers = [
  6. "slow: marks tests as slow (deselect with '-m \"not slow\"')",
  7. ]
  8. testpaths = [
  9. "tests"
  10. ]
  11. xfail_strict = true
  12. [tool.ruff]
  13. # Exclude a variety of commonly ignored directories.
  14. exclude = [
  15. ".bzr",
  16. ".direnv",
  17. ".eggs",
  18. ".git",
  19. ".git-rewrite",
  20. ".hg",
  21. ".ipynb_checkpoints",
  22. ".mypy_cache",
  23. ".nox",
  24. ".pants.d",
  25. ".pyenv",
  26. ".pytest_cache",
  27. ".pytype",
  28. ".ruff_cache",
  29. ".svn",
  30. ".tox",
  31. ".venv",
  32. ".vscode",
  33. "__pypackages__",
  34. "_build",
  35. "buck-out",
  36. "build",
  37. "dist",
  38. "node_modules",
  39. "site-packages",
  40. "venv",
  41. ]
  42. # Same as Black.
  43. line-length = 88
  44. indent-width = 4
  45. # Assume Python 3.8
  46. target-version = "py38"
  47. [tool.ruff.lint]
  48. # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
  49. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
  50. # McCabe complexity (`C901`) by default.
  51. select = ["F821", "F822", "E999", "E902", "F401", "F841"]
  52. ignore = []
  53. # Allow fix for all enabled rules (when `--fix`) is provided.
  54. fixable = ["ALL"]
  55. unfixable = []
  56. # Allow unused variables when underscore-prefixed.
  57. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
  58. [tool.ruff.format]
  59. # Like Black, use double quotes for strings.
  60. quote-style = "double"
  61. # Like Black, indent with spaces, rather than tabs.
  62. indent-style = "space"
  63. # Like Black, respect magic trailing commas.
  64. skip-magic-trailing-comma = false
  65. # Like Black, automatically detect the appropriate line ending.
  66. line-ending = "auto"