pyright/docs/commands.md

12 строки
1009 B
Markdown
Исходник Постоянная ссылка Обычный вид История

## VS Code Commands
2019-08-29 17:51:57 +03:00
Pyright offers the following commands, which can be invoked from VS Codes “Command Palette”, which can be accessed from the View menu or by pressing Cmd-Shift-P.
2019-08-29 17:51:57 +03:00
### Organize Imports
2019-08-29 17:51:57 +03:00
This command reorders all imports found in the global (module-level) scope of the source file. As recommended in PEP8, imports are grouped into three groups, each separated by an empty line. The first group includes all built-in modules, the second group includes all third-party modules, and the third group includes all local modules.
Within each group, imports are sorted alphabetically. And within each “from X import Y” statement, the imported symbols are sorted alphabetically. Pyright also rewraps any imports that don't fit within a single line, switching to multi-line formatting.
2020-03-08 22:17:19 +03:00
### Restart Server
2020-03-08 22:17:19 +03:00
This command forces the type checker to discard all of its cached type information and restart analysis. It is useful in cases where new type stubs or libraries have been installed.