Skip to content

Commit 7f44b2a

Browse files
committed
Update dependencies, fix tests based on latest docstring-to-markdown
1 parent 62f0c46 commit 7f44b2a

File tree

6 files changed

+254
-245
lines changed

6 files changed

+254
-245
lines changed

mypy.ini

Lines changed: 0 additions & 6 deletions
This file was deleted.

poetry.lock

Lines changed: 232 additions & 226 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
[build-system]
2-
requires = ["poetry-core>=1.7.1"]
2+
requires = ["poetry-core>=1.8.0"]
33
build-backend = "poetry.core.masonry.api"
44

5+
[tool.mypy]
6+
python_version = "3.8"
7+
strict = true
8+
enable_error_code = "ignore-without-code,redundant-expr,truthy-bool"
9+
10+
[[tool.mypy.overrides]]
11+
module = "jedi.*"
12+
ignore_missing_imports = true
13+
514
[tool.poetry]
615
name = "jedi-language-server"
716
version = "0.41.2"
@@ -40,7 +49,7 @@ docstring-to-markdown = "0.*"
4049
lsprotocol = ">=2022.0.0a9"
4150
typing-extensions = {version = "^4.5.0", python = "<3.10"}
4251

43-
[tool.poetry.dev-dependencies]
52+
[tool.poetry.group.dev.dependencies]
4453
PyHamcrest = "*"
4554
mypy = "*"
4655
nox = "*"
@@ -81,8 +90,8 @@ ignore = [
8190
"E501" # line-too-long
8291
]
8392

84-
[tool.ruff.per-file-ignores]
93+
[tool.ruff.lint.per-file-ignores]
8594
"tests/test_data/*" = ["ALL"]
8695

87-
[tool.ruff.pydocstyle]
96+
[tool.ruff.lint.pydocstyle]
8897
convention = "pep257"

tests/lsp_tests/test_completion.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_lsp_completion() -> None:
5959
"detail": "def my_function()",
6060
"documentation": {
6161
"kind": "markdown",
62-
"value": "```text\nSimple test function.\n```",
62+
"value": "Simple test function.",
6363
},
6464
"sortText": "v0",
6565
"filterText": "my_function",
@@ -100,7 +100,7 @@ def test_eager_lsp_completion() -> None:
100100
"detail": "def my_function()",
101101
"documentation": {
102102
"kind": "markdown",
103-
"value": "```text\nSimple test function.\n```",
103+
"value": "Simple test function.",
104104
},
105105
"sortText": "v0",
106106
"filterText": "my_function",
@@ -145,7 +145,7 @@ def test_lsp_completion_class_method() -> None:
145145
"detail": "def some_method(x)",
146146
"documentation": {
147147
"kind": "markdown",
148-
"value": "```text\nGreat method.\n```",
148+
"value": "Great method.",
149149
},
150150
"sortText": "v0",
151151
"filterText": "some_method",
@@ -185,7 +185,7 @@ def test_lsp_completion_class_noargs() -> None:
185185
"detail": "class MyClass()",
186186
"documentation": {
187187
"kind": "markdown",
188-
"value": "```text\nSimple class.\n```",
188+
"value": "Simple class.",
189189
},
190190
"sortText": "v0",
191191
"filterText": "MyClass",

tests/lsp_tests/test_hover.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_hover_on_module():
2727
expected = {
2828
"contents": {
2929
"kind": "markdown",
30-
"value": "```python\nmodule somemodule\n```\n---\n```text\nModule doc string for testing.\n```",
30+
"value": "```python\nmodule somemodule\n```\n---\nModule doc string for testing.",
3131
},
3232
"range": {
3333
"start": {"line": 2, "character": 7},
@@ -55,7 +55,7 @@ def test_hover_on_function():
5555
expected = {
5656
"contents": {
5757
"kind": "markdown",
58-
"value": "```python\ndef do_something()\n```\n---\n```text\nFunction doc string for testing.\n```\n**Full name:** `somemodule.do_something`",
58+
"value": "```python\ndef do_something()\n```\n---\nFunction doc string for testing.\n**Full name:** `somemodule.do_something`",
5959
},
6060
"range": {
6161
"start": {"line": 4, "character": 11},
@@ -83,7 +83,7 @@ def test_hover_on_class():
8383
expected = {
8484
"contents": {
8585
"kind": "markdown",
86-
"value": "```python\nclass SomeClass()\n```\n---\n```text\nClass doc string for testing.\n```\n**Full name:** `somemodule.SomeClass`",
86+
"value": "```python\nclass SomeClass()\n```\n---\nClass doc string for testing.\n**Full name:** `somemodule.SomeClass`",
8787
},
8888
"range": {
8989
"start": {"line": 6, "character": 15},
@@ -111,7 +111,7 @@ def test_hover_on_method():
111111
expected = {
112112
"contents": {
113113
"kind": "markdown",
114-
"value": "```python\ndef some_method()\n```\n---\n```text\nMethod doc string for testing.\n```\n**Full name:** `somemodule.SomeClass.some_method`",
114+
"value": "```python\ndef some_method()\n```\n---\nMethod doc string for testing.\n**Full name:** `somemodule.SomeClass.some_method`",
115115
},
116116
"range": {
117117
"start": {"line": 8, "character": 2},

tests/lsp_tests/test_signature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_signature_help(trigger_char, column, active_param):
4141
),
4242
"documentation": {
4343
"kind": "markdown",
44-
"value": "```text\nThis is a test function.\n```",
44+
"value": "This is a test function.",
4545
},
4646
"parameters": [
4747
{"label": "arg1: str"},

0 commit comments

Comments
 (0)