Skip to content

Commit 526ec12

Browse files
committed
Add comment on lines indices
1 parent c8cfa53 commit 526ec12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pylsp_black/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def pylsp_settings():
6666
def format_document(client_config, document, range=None):
6767
text = document.source
6868
config = load_config(document.path, client_config)
69+
# Black lines indices are "1-based and inclusive on both ends"
6970
lines = [(range["start"]["line"] + 1, range["end"]["line"])] if range else ()
7071

7172
try:

0 commit comments

Comments
 (0)