python: Fix autocomplete sorting (#44050)

Closes:
#38727 (Python autocompletion being sorted alphabetically)
<img
src="https://github.com/user-attachments/assets/8208d511-f4a4-41f9-8550-3b24370bf776"
width="400">

<img
src="https://github.com/user-attachments/assets/e7c99d7a-b61e-463b-b0f1-36cd279b3887"
width="400">


Release Notes:
- Improve sort order of pyright/basedpyright code completions
a688239113Alexander Andreev committed on 12/3/2025, 12:51:18 PM· committed by GitHubparent4e8f6dd
1 file changedLine totals unavailable