diff --git a/Makefile b/Makefile index 73a0b4cf..596a00e3 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,11 @@ install: .PHONY: ci-check ci-check: mypy -p plugin - flake8 . - black --check --diff --preview . - isort --check --diff . + ruff check --diff --preview . + black --diff --preview --check . .PHONY: ci-fix ci-fix: - autoflake --in-place . + ruff check --preview --fix . + # ruff format --preview . black --preview . - isort . diff --git a/pyproject.toml b/pyproject.toml index cb212899..e4a40342 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,28 +9,6 @@ module = ["plugin.libs.*"] ignore_errors = true ignore_missing_imports = true -[tool.isort] -line_length = 120 -profile = 'black' -py_version = 38 -skip_glob = [ - ".venv/**", - "br-*/**", - "branch-*/**", - "libs/**", - "plugin/libs/**", - "stubs/**", - "typings/**", - "vendor/**", - "venv/**", -] - -[tool.autoflake] -quiet = true -recursive = true -remove-all-unused-imports = true -exclude = '\.git,\.?venv,\.mypy_cache,br-.*,branch-.*,libs,stubs,tests/files,typings' - [tool.black] preview = true line-length = 120 @@ -52,21 +30,37 @@ exclude = ''' [tool.pyright] include = ['./'] exclude = [ - '**/__pycache__/', - '**/node_modules/', - # git-related - '**/.git/', - '**/br-*/', - '**/branch-*/', + '**/__pycache__/', + '**/node_modules/', + # git-related + '**/.git/', + '**/br-*/', + '**/branch-*/', ] ignore = ['**/.venv', '**/libs'] stubPath = 'typings' pythonVersion = '3.8' [tool.ruff] -select = ["E", "F", "W"] +preview = true +select = ["E", "F", "W", "I"] +ignore = ["E203"] line-length = 120 -target-version = 'py38' +target-version = 'py312' +exclude = [ + ".git", + ".mypy_cache", + ".venv", + ".venv-*", + "branch-*", + "libs", + "plugin/libs", + "stubs", + "tests/files", + "typings", + "venv", + "venv-*", +] [tool.ruff.per-file-ignores] "boot.py" = ["E402"] diff --git a/requirements.txt b/requirements.txt index 56e8f8bf..350988bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ # This is an implicit value, here for clarity --index https://pypi.python.org/simple/ -autoflake black -flake8 -isort mypy +ruff