Skip to content

Tox use ruff #864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2023
Merged
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
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ clean-build:
@rm -fr dist/
@rm -fr *.egg-info

format fmt:
isort --recursive oauthlib tests
format fmt black:
black .

lint:
isort --recursive --check-only --diff oauthlib tests
lint ruff:
ruff .

test:
tox
Expand Down Expand Up @@ -81,4 +81,4 @@ dance:

.DEFAULT_GOAL := all
.PHONY: clean test bottle dance django flask requests
all: test bottle dance django flask requests
all: lint test bottle dance django flask requests
21 changes: 6 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# require tox>=4
[tox]
envlist = py38,py39,py310,py311,py312,pypy3,docs,readme,bandit,isort
envlist = py38,py39,py310,py311,py312,pypy3,docs,readme,ruff

[testenv]
deps=
Expand All @@ -9,7 +9,6 @@ commands=
pytest --cov=oauthlib tests/

# tox -e docs to mimic readthedocs build.
# as of today, RTD is using python3.7 and doesn't run "setup.py install"
[testenv:docs]
basepython=python3.11
skipsdist=True
Expand All @@ -28,16 +27,8 @@ allowlist_externals=echo
commands=
twine check .tox/.pkg/dist/*

[testenv:bandit]
basepython=python3.11
skipsdist=True
deps=bandit
commands=bandit -b bandit.json -r oauthlib/
allowlist_externals=bandit

[testenv:isort]
basepython = python3.8
usedevelop = false
deps = isort
changedir = {toxinidir}
commands = isort --recursive --check-only --diff oauthlib tests
[testenv:ruff]
deps=ruff
allowlist_externals=ruff
skip_install=true
commands=ruff .