Skip to content

Commit c516911

Browse files
committed
Add jedi_ plugin prefix for consistency.
1 parent 86a91ff commit c516911

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed

CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This server can be configured using the `workspace/didChangeConfiguration` metho
3333
| `pylsp.plugins.jedi_completion.resolve_at_most` | `integer` | How many labels and snippets (at most) should be resolved? | `25` |
3434
| `pylsp.plugins.jedi_completion.cache_for` | `array` of `string` items | Modules for which labels and snippets should be cached. | `["pandas", "numpy", "tensorflow", "matplotlib"]` |
3535
| `pylsp.plugins.jedi_definition.enabled` | `boolean` | Enable or disable the plugin. | `true` |
36-
| `pylsp.plugins.type_definition.enabled` | `boolean` | Enable or disable the plugin. | `true` |
36+
| `pylsp.plugins.jedi_type_definition.enabled` | `boolean` | Enable or disable the plugin. | `true` |
3737
| `pylsp.plugins.jedi_definition.follow_imports` | `boolean` | The goto call will follow imports. | `true` |
3838
| `pylsp.plugins.jedi_definition.follow_builtin_imports` | `boolean` | If follow_imports is True will decide if it follow builtin imports. | `true` |
3939
| `pylsp.plugins.jedi_definition.follow_builtin_definitions` | `boolean` | Follow builtin and extension definitions to stubs. | `true` |

pylsp/config/schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,6 @@
225225
"default": true,
226226
"description": "Enable or disable the plugin."
227227
},
228-
"pylsp.plugins.type_definition.enabled": {
229-
"type": "boolean",
230-
"default": true,
231-
"description": "Enable or disable the plugin."
232-
},
233228
"pylsp.plugins.jedi_definition.follow_imports": {
234229
"type": "boolean",
235230
"default": true,
@@ -275,6 +270,11 @@
275270
"default": true,
276271
"description": "If True includes symbols imported from other libraries."
277272
},
273+
"pylsp.plugins.jedi_type_definition.enabled": {
274+
"type": "boolean",
275+
"default": true,
276+
"description": "Enable or disable the plugin."
277+
},
278278
"pylsp.plugins.mccabe.enabled": {
279279
"type": "boolean",
280280
"default": true,

pylsp/plugins/type_definition.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# Copyright 2017-2020 Palantir Technologies, Inc.
21
# Copyright 2021- Python Language Server Contributors.
32

43
import logging
54

65
from pylsp import _utils, hookimpl
76

8-
97
log = logging.getLogger(__name__)
108

119

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ folding = "pylsp.plugins.folding"
6666
flake8 = "pylsp.plugins.flake8_lint"
6767
jedi_completion = "pylsp.plugins.jedi_completion"
6868
jedi_definition = "pylsp.plugins.definition"
69-
type_definition = "pylsp.plugins.type_definition"
69+
jedi_type_definition = "pylsp.plugins.type_definition"
7070
jedi_hover = "pylsp.plugins.hover"
7171
jedi_highlight = "pylsp.plugins.highlight"
7272
jedi_references = "pylsp.plugins.references"

test/plugins/test_type_definition.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Copyright 2017-2020 Palantir Technologies, Inc.
21
# Copyright 2021- Python Language Server Contributors.
32

4-
import os
5-
63
from pylsp import uris
74
from pylsp.plugins.type_definition import pylsp_type_definition
85
from pylsp.workspace import Document
@@ -45,7 +42,6 @@ def test_builtin_definition(config, workspace) -> None:
4542
cursor_pos = {"line": 8, "character": 9}
4643

4744
doc = Document(DOC_URI, workspace, DOC)
48-
orig_settings = config.settings()
4945

5046
defns = pylsp_type_definition(config, doc, cursor_pos)
5147
assert len(defns) == 1
@@ -95,9 +91,6 @@ def main() -> None:
9591
# The position where IntPair is called in main.py
9692
cursor_pos = {"line": 5, "character": 14}
9793

98-
print("!URI", module_uri)
99-
print("!URI", doc_uri)
100-
10194
assert [{"uri": module_uri, "range": def_range}] == pylsp_type_definition(
10295
config, doc, cursor_pos
10396
)

0 commit comments

Comments
 (0)