🧑💻 Use ruff/mypy/black linter/type-checker/formatter
* Use of python-lsp-server with emacs (cf. .dir-locals.el file) * Remove autopep8/pycodestyle/pydocstyle/pyflakes/pylint/yapf
This commit is contained in:
10
backend/.dir-locals.el
Normal file
10
backend/.dir-locals.el
Normal file
@@ -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))))))))
|
@@ -21,38 +21,26 @@ msgspec = "^0.12.0"
|
|||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
mypy = "^0.971"
|
|
||||||
pylsp-mypy = "^0.6.2"
|
pylsp-mypy = "^0.6.2"
|
||||||
autopep8 = "^1.7.0"
|
|
||||||
mccabe = "^0.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"
|
rope = "^1.3.0"
|
||||||
python-lsp-server = {extras = ["yapf"], version = "^1.5.0"}
|
|
||||||
python-lsp-black = "^1.2.1"
|
python-lsp-black = "^1.2.1"
|
||||||
black = "^22.10.0"
|
black = "^22.10.0"
|
||||||
whatthepatch = "^1.0.2"
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
|
||||||
types-aiofiles = "^22.1.0.2"
|
types-aiofiles = "^22.1.0.2"
|
||||||
sqlalchemy-stubs = "^0.4"
|
sqlalchemy-stubs = "^0.4"
|
||||||
wrapt = "^1.14.1"
|
wrapt = "^1.14.1"
|
||||||
pydocstyle = "^6.2.2"
|
pydocstyle = "^6.2.2"
|
||||||
pylint = "^2.15.9"
|
|
||||||
dill = "^0.3.6"
|
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]
|
[tool.black]
|
||||||
enabled = true
|
target-version = ['py311']
|
||||||
|
|
||||||
[mypy]
|
|
||||||
plugins = "sqlmypy"
|
|
||||||
|
|
||||||
[pycodestyle]
|
|
||||||
max_line_length = 100
|
|
||||||
|
|
||||||
[pylint]
|
|
||||||
max-line-length = 100
|
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 88
|
||||||
|
Reference in New Issue
Block a user