From d1db97554c8aedc51befc9455b820a6341008db7 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 5 Feb 2023 23:10:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Use=20ruff/?= =?UTF-8?q?mypy/black=20linter/type-checker/formatter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use of python-lsp-server with emacs (cf. .dir-locals.el file) * Remove autopep8/pycodestyle/pydocstyle/pyflakes/pylint/yapf --- backend/.dir-locals.el | 10 ++++++++++ backend/pyproject.toml | 34 +++++++++++----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 backend/.dir-locals.el diff --git a/backend/.dir-locals.el b/backend/.dir-locals.el new file mode 100644 index 0000000..ee76769 --- /dev/null +++ b/backend/.dir-locals.el @@ -0,0 +1,10 @@ +;; Cf. https://gist.github.com/doolio/8c1768ebf33c483e6d26e5205896217f +((python-mode + . ((eglot-workspace-configuration + . (:pylsp (:plugins (:pylint (:enabled :json-false) + :pycodestyle (:enabled :json-false) + :yapf (:enabled :json-false) + :pyflakes (:enabled :json-false) + :ruff (:enabled t) + :mypy (:enabled t) + :black (:enabled t)))))))) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index e7d55af..074ede0 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -21,38 +21,26 @@ msgspec = "^0.12.0" requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" -[tool.poetry.dev-dependencies] -mypy = "^0.971" +[tool.poetry.group.dev.dependencies] pylsp-mypy = "^0.6.2" -autopep8 = "^1.7.0" mccabe = "^0.7.0" -pycodestyle = "^2.9.1" -pydocstyle = "^6.1.1" -pyflakes = "^2.5.0" -pylint = "^2.14.5" rope = "^1.3.0" -python-lsp-server = {extras = ["yapf"], version = "^1.5.0"} python-lsp-black = "^1.2.1" black = "^22.10.0" -whatthepatch = "^1.0.2" - -[tool.poetry.group.dev.dependencies] types-aiofiles = "^22.1.0.2" sqlalchemy-stubs = "^0.4" wrapt = "^1.14.1" pydocstyle = "^6.2.2" -pylint = "^2.15.9" dill = "^0.3.6" +python-lsp-ruff = "^1.0.5" +python-lsp-server = "^1.7.1" +autopep8 = "^2.0.1" +pyflakes = "^3.0.1" +yapf = "^0.32.0" +whatthepatch = "^1.0.4" -[tool.pylsp-mypy] -enabled = true - -[mypy] -plugins = "sqlmypy" - -[pycodestyle] -max_line_length = 100 - -[pylint] -max-line-length = 100 +[tool.black] +target-version = ['py311'] +[tool.ruff] +line-length = 88