Skip to content

Commit 8fa5ddb

Browse files
prurphjonathanslenders
authored andcommitted
Pass style with meta completion text
1 parent 73a1255 commit 8fa5ddb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ptpython/completer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,15 @@ def get_completions(
285285
if jc.type == "param":
286286
suffix = "..."
287287

288+
style = _get_style_for_jedi_completion(jc)
289+
display_meta = jc.type if style == "" else [(style, jc.type)]
290+
288291
yield Completion(
289292
jc.name_with_symbols,
290293
len(jc.complete) - len(jc.name_with_symbols),
291294
display=jc.name_with_symbols + suffix,
292-
display_meta=jc.type,
293-
style=_get_style_for_jedi_completion(jc),
295+
display_meta=display_meta,
296+
style=style,
294297
)
295298

296299

0 commit comments

Comments
 (0)