From 4c4aec52a525c0ce59d9b5b7c59ac9df70146ad0 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 6 Mar 2023 15:46:07 -0700 Subject: [PATCH] Added support for docsify-based docs site. --- docs/.nojekyll | 0 docs/README.md | 10 ++++++++++ docs/_sidebar.md | 38 ++++++++++++++++++++++++++++++++++++++ docs/index.html | 41 +++++++++++++++++++++++++++++++++++++++++ docs/installation.md | 39 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 128 insertions(+) create mode 100644 docs/.nojekyll create mode 100644 docs/README.md create mode 100644 docs/_sidebar.md create mode 100644 docs/index.html create mode 100644 docs/installation.md diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..3965d1c2f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,10 @@ +![Pyright](/img/PyrightLarge.png) + +# Static type checker for Python + +Pyright is a full-featured, standards-based static type checker for Python. It is designed for high performance and can be used with large Python source bases. + +### Command-line Tool or Visual Studio Code Extension +Pyright includes both a [command-line tool](command-line.md) and an [extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright) that implements the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). + + diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 000000000..85fdaa836 --- /dev/null +++ b/docs/_sidebar.md @@ -0,0 +1,38 @@ +- Getting started + + - [Installation](installation.md) + - [Type Concepts](type-concepts.md) + - [Getting Started with Type Checking](getting-started.md) + - [Pyright Features](features.md) + + +- Customization + + - [Continuous Integration (CI)](ci-integration.md) + - [Configuration](configuration.md) + - [Configuration Options](configuration.md#main-pyright-config-options) + - [Diagnostic Rules](configuration.md#type-check-diagnostics-settings) + - [Execution Environments](configuration.md#execution-environment-options) + - [Sample pyrightconfig.json](configuration.md#sample-config-file) + - [Sample pyproject.toml](configuration.md#sample-pyprojecttoml-file) + - [Diagnostic Rule Defaults](configuration.md#diagnostic-rule-defaults) + - [Settings](settings.md) + - [Comments](comments.md) + +- Usage + + - [Type Inference](type-inference.md) + - [Import Statements](import-statements.md) + - [Import Resolution](import-resolution.md) + - [Extending Builtins](builtins.md) + - [Type Stubs](type-stubs.md) + - [Types in Libraries](typed-libraries.md) + - [Differences from Mypy](mypy-comparison.md) + - [Commands](commands.md) + +- Advanced Topics + + - [Building & Debugging](build-debug.md) + - [Pyright Internals](internals.md) + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..fe3f55811 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,41 @@ + + + + + Document + + + + + + +
+ + + + + + + + + diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 000000000..b79b2711e --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,39 @@ +## Installation +### VS Code Extension +For most VS Code users, we recommend using the Pylance extension rather than Pyright. Pylance incorporates the Pyright type checker but features additional capabilities such as semantic token highlighting and symbol indexing. You can install the latest-published version of the Pylance VS Code extension directly from VS Code. Simply open the extensions panel and search for “Pylance”. + +### Vim +Vim/neovim users can install [coc-pyright](https://github.com/fannheyward/coc-pyright), the Pyright extension for coc.nvim. + +Alternatively, [ALE](https://github.com/dense-analysis/ale) will automatically check your code with Pyright if added to the linters list. + +### Sublime Text +Sublime text users can install the [LSP-pyright](https://github.com/sublimelsp/LSP-pyright) plugin from [package control](https://packagecontrol.io/packages/LSP-pyright). + +### Emacs +Emacs users can install [eglot](https://github.com/joaotavora/eglot) or [lsp-mode](https://github.com/emacs-lsp/lsp-mode) with [lsp-pyright](https://github.com/emacs-lsp/lsp-pyright). + +### Command-line +A [community-maintained](https://github.com/RobertCraigie/pyright-python) Python package by the name of “pyright” is available on pypi and conda-forge. This package will automatically install node (which Pyright requires) and keep Pyright up to date. + +`pip install pyright` + +or + +`conda install pyright` + +Once installed, you can run the tool from the command line as follows: +`pyright ` + + +Alternatively, you can install the command-line version of Pyright directly from npm, which is part of node. If you don't have a recent version of node on your system, install that first from [nodejs.org](https://nodejs.org). + +To install pyright globally: +`npm install -g pyright` + +On MacOS or Linux, sudo may be required to install globally: +`sudo npm install -g pyright` + +To update to the latest version: +`sudo npm update -g pyright` +