Skip to content

Commit 1b7d8b8

Browse files
committed
Update docstring
1 parent 0844fb1 commit 1b7d8b8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pylsp_ruff/plugin.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ def pylsp_lint(workspace: Workspace, document: Document) -> List[Dict]:
139139

140140

141141
def create_diagnostic(check: RuffCheck, settings: PluginSettings) -> Diagnostic:
142+
"""
143+
Create a LSP diagnostic based on the given RuffCheck object.
144+
145+
Parameters
146+
----------
147+
check : RuffCheck
148+
RuffCheck object to convert.
149+
settings : PluginSettings
150+
Current settings.
151+
152+
Returns
153+
-------
154+
Diagnostic
155+
"""
142156
# Adapt range to LSP specification (zero-based)
143157
range = Range(
144158
start=Position(

0 commit comments

Comments
 (0)