Skip to content

Commit

Permalink
maint: migrate from black to ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
Abel Aoun committed May 14, 2024
1 parent 328c28a commit 8579ce3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -172,10 +164,6 @@ exclude = [
"docs/locales"
]

[tool.isort]
profile = "black"
py_version = 38

[tool.mypy]
files = "."
python_version = 3.9
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 8579ce3

Please sign in to comment.