From 80ab8c108d90917016279de8610529b1ef583667 Mon Sep 17 00:00:00 2001 From: David Barnett Date: Fri, 23 Aug 2024 15:10:27 -0600 Subject: [PATCH] Tooling: drop flake8, configure ruff and editorconfig --- .editorconfig | 6 ++++++ pyproject.toml | 16 ++++++++++------ setup.cfg | 9 --------- tox.ini | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 .editorconfig delete mode 100644 setup.cfg diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e65b127 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*.py] +indent_style = space +indent_size = 4 +max_line_length = 80 diff --git a/pyproject.toml b/pyproject.toml index c788815..efe71ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,12 +52,16 @@ gcalcli = "gcalcli.cli:main" [tool.distutils.bdist_wheel] universal = true -[tool.isort] -profile = "google" -force_single_line = false -float_to_top = true -combine_star = true -py_version = 3 +[tool.ruff] +line-length = 80 + +[tool.ruff.lint] +# Enable Errors, Warnings, Flakes +select = ["E", "W", "F"] + +[tool.ruff.format] +# Permit mixed quote style, project currently uses a mix of both. +quote-style = "preserve" [[tool.mypy.overrides]] module = ["gcalcli"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 6eb7126..0000000 --- a/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[flake8] -import-order-style = google -exclude = - .git, - __pycache__, - venv, - .env, - .tox, - .venv diff --git a/tox.ini b/tox.ini index 34afb90..78d1675 100644 --- a/tox.ini +++ b/tox.ini @@ -6,9 +6,9 @@ usedevelop=true deps = pytest pytest-cov coverage - flake8 + ruff vobject commands=py.test -vv --cov=./gcalcli --pyargs tests {posargs} coverage html - flake8 + ruff check