diff --git a/docs/import-resolution.md b/docs/import-resolution.md index 17ceaa7bd..0306861de 100644 --- a/docs/import-resolution.md +++ b/docs/import-resolution.md @@ -41,9 +41,9 @@ Pyright uses the following mechanisms (in priority order) to determine which Pyt ## Editable installs -[PEP 660](https://peps.python.org/pep-0660/) enables build backends (ex. setuptools) to +[PEP 660](https://peps.python.org/pep-0660/) enables build backends (e.g. setuptools) to use import hooks to direct the [import machinery](https://docs.python.org/3/reference/import.html) -to the package's source files rather than using a `.pth` file. Import hooks can provide +to the package’s source files rather than using a `.pth` file. Import hooks can provide an editable installation that is a more accurate representation of your real installation. However, because resolving module locations using an import hook requires executing Python code, they are not usable by Pyright and other static analysis tools. Therefore, if your @@ -51,15 +51,15 @@ editable install is configured to use import hooks, Pyright will be unable to fi corresponding source files. If you want to use static analysis tools with an editable install, you should configure -the editable install to use `.pth` files instead of import hooks. See your build backend's +the editable install to use `.pth` files instead of import hooks. See your build backend’s documentation for details on how to do this. We have provided some basic information for common build backends below. ### Setuptools -Setuptools currently supports two ways to request -["compat mode"](https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior) +Setuptools currently supports two ways to request: +[“compat mode”](https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behavior) where a `.pth` file will be used -- a config setting and an environment variable. Another -option is ["strict mode"](https://setuptools.pypa.io/en/latest/userguide/development_mode.html#strict-editable-installs) +option is [“strict mode”](https://setuptools.pypa.io/en/latest/userguide/development_mode.html#strict-editable-installs) which uses symlinks instead. ### Hatch/Hatchling