Skip to content
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

Use ruff instead of flake8 + isort #84

Merged
merged 1 commit into from
Jun 26, 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
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ coverage: ## Run the test suite, with Python code coverage

.PHONY: format
format: ## Autoformat all files
$(PYTHON) -m isort $(python_files)
$(PYTHON) -m ruff --fix $(python_files)
$(PYTHON) -m black $(python_files)

.PHONY: lint
lint: ## Lint all files
$(PYTHON) -m isort --check $(python_files)
$(PYTHON) -m flake8 $(python_files)
$(PYTHON) -m ruff check $(python_files)
$(PYTHON) -m black --check --diff $(python_files)
$(PYTHON) -m mypy src/pytest_memray --ignore-missing-imports

Expand Down
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ optional-dependencies.docs = [
]
optional-dependencies.lint = [
"black==22.12",
"flake8==6",
"ruff==0.0.272",
"isort==5.11.4",
"mypy==0.991",
]
Expand Down Expand Up @@ -114,3 +114,13 @@ type = [
{ name = "Improved Documentation", directory = "doc", showcontent = true },
{ name = "Miscellaneous", directory = "misc", showcontent = true },
]

[tool.ruff]
ignore = ['E501']
line-length = 95
select = [
'E',
'F',
'W',
]
isort = {known-first-party = ["pytest_memray"], required-imports = ["from __future__ import annotations"]}
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,3 @@ extras =
test
commands =
python -c 'import sys; print(sys.executable)'

[flake8]
max-line-length = 95
ignore = E501, W503