模板

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
[tool.pylsp-mypy]
enabled = true
live_mode = false
dmypy = true                    # enable dmypy
strict = true


[tool.pdm.dev-dependencies]
lsp = [
    "python-lsp-server>=1.8.0",
    "python-lsp-ruff>=1.5.1",
    "python-lsp-black>=1.3.0",
    "pylsp-mypy>=0.6.7",
    "pylsp-rope>=0.1.11",
]

[tool.ruff]
ignore = ["E501"]               # ignore line length
line-length = 100

pylsp + pdm

pdm add -dG lsp python-lsp-server python-lsp-ruff python-lsp-black pylsp-mypy pylsp-rope