From da81cdf22f09a3b093da6d230099d49f55efcc2e Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 19 Jan 2022 12:53:07 -0800 Subject: [PATCH] Updated documentation to cover the new `# pyright: basic` comment. --- docs/comments.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/comments.md b/docs/comments.md index fd602c106..69c27d3a4 100644 --- a/docs/comments.md +++ b/docs/comments.md @@ -12,13 +12,19 @@ self._target = 3 # type: Union[int, str] ``` ## File-level Type Controls -Strict typing controls (where all supported type-checking switches generate errors) can be enabled for a file through the use of a special comment. Typically this comment is placed at or near the top of a code file on its own line. +Strict type checking, where most supported type-checking switches generate errors, can be enabled for a file through the use of a special comment. Typically this comment is placed at or near the top of a code file on its own line. ```python # pyright: strict ``` -Individual configuration settings can also be overridden on a per-file basis and combined with “strict” typing. For example, if you want to enable all type checks except for “reportPrivateUsage”, you could add the following comment: +Likewise, basic type checking can be enabled for a file. + +```python +# pyright: basic +``` + +Individual configuration settings can also be overridden on a per-file basis and optionally combined with “strict” or “basic” type checking. For example, if you want to enable all type checks except for “reportPrivateUsage”, you could add the following comment: ```python # pyright: strict, reportPrivateUsage=false