Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ all: deps lint man package install
deps:
$(PYTHON) -m pip install .[dev]

# Format using black
BLACK_CMD=$(PYTHON) -m black --line-length 100 -t py38 --preview --exclude "build/.*|\.eggs/.*"
ISORT_CMD=$(PYTHON) -m isort --profile black --py 38
# Format using ruff
RUFF_CMD=$(PYTHON) -m ruff
format:
$(BLACK_CMD) .
$(ISORT_CMD) .
$(RUFF_CMD) format .
$(RUFF_CMD) check --select I --fix .

# Check formatting using black
# Check formatting using ruff
check_format:
$(BLACK_CMD) --check --diff .
$(ISORT_CMD) --check --diff .
$(RUFF_CMD) format --check --diff .
$(RUFF_CMD) check --select I --diff .

MYPY_COMMAND=$(PYTHON) -m mypy --show-error-codes
check_types:
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tool.ruff]
line-length = 100
target-version = "py38"
extend-exclude = ["build", ".eggs"]

[tool.ruff.lint.isort]
known-first-party = ["revup"]
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ include_package_data=True

[options.extras_require]
dev =
black==24.1.1
isort
ruff==0.15.16
pylint==3.2.7
mypy==1.13.0
build
Expand Down
Loading