diff --git a/Makefile b/Makefile index 66b8db4..dbd339a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean clean-build clean-pyc clean-test coverage dist docs help install lint lint/flake8 lint/black +.PHONY: clean clean-build clean-pyc clean-test coverage dist docs help install lint lint/flake8 lint/format-checkformat-check .DEFAULT_GOAL := help define BROWSER_PYSCRIPT @@ -58,12 +58,10 @@ lint/flake8: ## check style with flake8 ruff check src tests flake8 --config=.flake8 xncml tests -lint/black: ## check style with black - black --check src/xncml tests - blackdoc --check src/xncml docs - isort --check src/xncml tests +lint/format-check: ## check style with ruff format + ruff format --check src/xncml tests -lint: lint/flake8 lint/black ## check style +lint: lint/flake8 lint/format-check ## check style test: ## run tests quickly with the default Python python -m pytest diff --git a/pyproject.toml b/pyproject.toml index c002f7e..5573e2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,14 +83,6 @@ all = ["xncml[dev]", "xncml[docs]"] "Issue tracker" = "https://github.com/xarray-contrib/xncml/issues" "Changelog" = "https://github.com/xarray-contrib/xncml/blob/main/CHANGELOG.rst" -[tool.black] -target-version = [ - "py39", - "py310", - "py311", - "py312" -] - [tool.bumpversion] current_version = "0.5.0" commit = true @@ -172,10 +164,6 @@ exclude = [ "docs/locales" ] -[tool.isort] -profile = "black" -py_version = 38 - [tool.mypy] files = "." python_version = 3.9 @@ -215,6 +203,8 @@ exclude = [ ] [tool.ruff.format] +# Enable reformatting of code snippets in docstrings. +docstring-code-format = true line-ending = "auto" [tool.ruff.lint]