diff --git a/pyproject.toml b/pyproject.toml index 4849f0b5..fca4607b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,36 @@ [build-system] requires = ["setuptools>=62.3", "oldest-supported-numpy", "cython~=3.0", "raysect==0.8.1.*"] build-backend="setuptools.build_meta" + +[tool.ruff] +line-length = 120 +include = ["cherab/**/*.py", "demos/**/*.py"] + +[tool.ruff.lint] +select = [ + "E", # pycodestyle + "B", # flake8-bugbear + "F", # pyflakes + "I", # isort (import order) + "N", # pep8-naming + "W", # Warning + "UP", # pyupgrade + "NPY", # numpy specific rules + "D", # pydocstyle + "DOC", # pydoclint +] +preview = true +ignore = [ + # Recommended ignores by ruff when using formatter + "E501", # line too long + "N803", # argument name should be lowercase + "N806", # variable in function should be lowercase + "D107", # missing docstring in __init__ + "F401", # ignore unused imports +] + +[tool.ruff.lint.pydocstyle] +convention = "numpy" + +[tool.cython-lint] +max-line-length = 140