Commit Graph

184 Commits

Author SHA1 Message Date
Jonas Vacek
4a9b9a547c
fix broken markdown link (#8186) 2024-06-20 15:55:37 +02:00
InSync
5f47007df3
Clarify description for exclude (#8148) 2024-06-16 05:59:09 +02:00
Eric Traut
4b84651950 Added the ability to override type checking configuration settings for each execution environment. This allows, for example, a test directory to use different settings than the directories that contain production code. This addresses #4059. 2024-06-06 15:25:01 -07:00
Eric Traut
421dabee57
Added support for configuration inheritance through an "extends" configuration option. This addresses #4366. (#7997) 2024-05-24 17:22:12 -07:00
Eric Traut
59b8963684 Attempted to clarify meaning of "include" and "exclude" in documentation. 2024-05-23 16:27:39 -07:00
Eric Traut
496e50f65c Tweaked documentation. 2024-05-08 21:04:00 -07:00
Rich Chiodo
36e00b8785
Add note about VS code's locale being used first (#7876)
In response to https://github.com/microsoft/pyright/issues/7873
2024-05-08 11:54:50 -07:00
Lucian Wischik
2935732b85
fix broken link in configuration.md (#7844) 2024-05-04 19:59:51 -07:00
Eric Traut
0a8e1b7af6 Fixed documentation and json schema for reportMissingTypeStubs default. This addresses #7789. 2024-04-26 21:40:57 -07:00
InSync
687fadef75
Fix a few typos in docs/configuration.md (#7739)
* Fix a typo

* Add missing "default" clause
2024-04-22 09:09:37 -07:00
Federico Caselli
1f168130a7
Use a list for the configuration options (#7565) 2024-03-26 13:59:55 -06:00
Eric Traut
6a042f7b58
Added new reportUnhashable diagnostic rule. This addresses #7462. (#7464) 2024-03-12 00:34:58 -06:00
Eric Traut
e67047551e Improved consistency of documentation when talking about diagnostic settings. 2024-02-21 15:39:13 -07:00
Lucian Wischik
3f6e47f719
Clarify that "exclude" overrides include directories *and* files (#7216)
The exclude directive overrides include directories *and* include files.

I verified by experiment, and also by reading the source code https://github.com/ljw1004/pyright/blob/main/packages/pyright-internal/src/common/uri/uriUtils.ts#L54
2024-02-06 12:02:57 -08:00
Blake Naccarato
9fb26eb7a3
Clarify virtual environment language in exclude part (#7133) 2024-01-26 09:22:57 -08:00
Eric Traut
3ebcef2d90 Fixed minor doc bug. 2024-01-21 20:28:15 -08:00
Eric Traut
197ecd7bc4
Added three new diagnostic rules: reportArgumentType covers argument type compatibility checks, reportAssignmentType covers type compatibility checks for assignments, and reportReturnType covers type compatibility checks for return and yield statements. This partially addresses #6973. (#7077) 2024-01-21 02:20:52 -08:00
Eric Traut
6ac1a7eebf
Added new diagnostic rule reportCallIssue that covers issues relating to call expressions and arguments. This partially addresses #6973. (#7076) 2024-01-21 01:47:43 -08:00
Eric Traut
63637459ca
Added two new diagnostic rules: reportAttributeAccessIssue is related to attribute accesses and reportIndexIssue is related to index operations and expressions. This partially addresses #6973. (#7075) 2024-01-21 01:35:19 -08:00
Eric Traut
8270551bbe
Added two new diagnostic rules: reportAbstractUsage reports invalid use of abstract classes and methods and reportOperatorIssue covers diagnostics related to unary and binary operators. This partially addresses #6973. (#7074) 2024-01-21 01:07:49 -08:00
Eric Traut
ec6052ea9d
Added two new diagnostic rules: reportInvalidTypeArguments reports invalid type arg usage and reportRedeclaration reports attempts to redeclare the type of a symbol. This partially addresses #6973. (#7073) 2024-01-21 00:33:05 -08:00
Eric Traut
7a67f4fbdb
Added two new diagnostic rules: reportInconsistentOverload reports inconsistencies between overload signatures and/or implementation and reportNoOverloadImplementation reports an overloaded function with a missing implementation. This partially addresses #6973. (#7072) 2024-01-21 00:04:55 -08:00
Eric Traut
91960fba49
Added new diagnostic rule reportPossiblyUnboundVariable, which is split off from reportUnboundVariable. This addresses #6896. (#7071) 2024-01-20 23:34:11 -08:00
Eric Traut
aa64fc5dec
Added two new diagnostic rules: reportAssertTypeFailure for type mismatches detected by typing.assert_type and reportUnusedExcept for situations where an except statement is determined to be unreachable. (#7070) 2024-01-20 22:21:42 -08:00
Eric Traut
04e0536a52
Added new diagnostic rule reportInvalidTypeForm that controls reporting of invalid type expression forms. This partly addresses #6973. (#7069) 2024-01-20 21:56:10 -08:00
Yashraj Singh
05711a0794
corrected typo in configuration.md (#6950) 2024-01-09 23:30:29 -08:00
Eric Traut
4afd9a4295 Added documentation for overriding the locale via env variables. 2024-01-05 09:44:27 -07:00
Eric Traut
fd5900f7e7 Clarified that reportOptionalOperand applies only to the LHS operand for binary operators. This addresses #6687. 2023-12-08 19:56:43 -08:00
Eric Traut
f605c8fb24
Added a new typeCheckingMode called "standard". It's a subset of "strict" but a superset of "basic". It is the new default mode, and it should cover all of the required checks for conformance with the Python typing standard. This addresses #66607. (#6627) 2023-12-01 23:44:12 -08:00
Eric Traut
73ec51cb37 Updated docs to further de-emphasize "venv" config option. 2023-11-07 07:44:30 -08:00
klezm
851571c10f
Adds default value for reportImplicitOverride to docs/configuration.md (#6056) 2023-10-02 07:43:24 -07:00
Eric Traut
fe1e16ec1e
Added a new configuration switch disableBytesTypePromotions that controls whether bytearray and memoryview should be implicit subtypes of bytes. This switch defaults to false in basic type checking mode and true in strict mode. Eventually, we will probably have it default to true in all modes. (#6024)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2023-09-25 12:00:40 -07:00
Eric Traut
4474b7d36b
Added a new configuration option deprecateTypingAliases that enables deprecation detection and reporting for symbols imported from the typing module that are deprecated according to PEP 585 and 604. The option is currently disabled by default (even in strict mode) but can be enabled manually. This addresses #3598. (#5812)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2023-08-25 11:17:37 -07:00
Eric Traut
d81ffb7b5c Added a new configuration options flag called enableExperimentalFeatures that controls whether certain experimental features are enabled. Currently there are three features under this flag: StrictTypeGuard, ReadOnly fields for typed dicts, and inlined TypedDict definitions. This addresses https://github.com/microsoft/pyright/issues/5598. 2023-07-28 22:22:08 -06:00
Eric Traut
9f81564a46 Changed reportImportCycles so it is not on by default in "strict" type checking mode. It is highly opinionated and should be used only in cases where the developer opts into it. 2023-04-08 10:29:14 -07:00
Eric Traut
5d6eacd5e1
Changed the default of the useLibraryCodeForTypes from false to true to bring pylance and pyright into alignment. Also deprecated the "--lib" command-line option, which was previously used to enable useLibraryCodeForTypes from the command line. (#4903)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2023-04-05 09:47:59 -06:00
Eric Traut
e2e3a5c9ff Added new diagnostic check reportImplicitOverride. This addresses https://github.com/microsoft/pyright/issues/4788. 2023-03-16 09:52:25 -06:00
Eric Traut
08b2cb4698 Did a consistency pass on documentation markdown. 2023-03-06 18:10:33 -07:00
Eric Traut
b3fd962116 Fixed bugs in documentation. 2023-03-06 15:45:51 -07:00
Eric Traut
4eb4397a90 Updated documentation for default exclude settings. 2023-02-08 13:09:55 -08:00
Eric Traut
b17f64ddcb A few more tweaks to the documentation for consistency. 2023-01-27 09:29:38 -08:00
Eric Traut
3829e8e32d Tweaked documentation for readability. 2023-01-27 09:26:30 -08:00
Eric Traut
53e8cd4145 Added provisional support for draft PEP 702 (marking deprecations using the type system). 2023-01-13 21:16:07 -08:00
Rich Chiodo
4897e993d5
Fix 'reportShadowedImports' link
Fixes https://github.com/microsoft/pylance-release/issues/3752
2022-12-12 09:51:37 -08:00
Eric Traut
5f48e39671 Exposed new configuration setting analyzeUnannotatedFunctions which corresponds to the --skipunannotated command-line option. Added an information diagnostic for skipped functions. This addresses https://github.com/microsoft/pyright/issues/4303. 2022-12-08 20:05:32 -08:00
Rich Chiodo
04a1058378
20221121 (#4174) 2022-11-09 16:00:25 -08:00
Rich Chiodo
8c0ba8a78a
Show a warning when a stdlib module is being overridden (#4132)
* Working for simple cases

* Fix localize

* Move logic to source mapper

* Add support for the current file

* Add rename file command

* Fix comments

* Closer to getting tests to work. Rename added

* Rework how stdlib modules are found. Fix tests

* Do the rename without bringing up a dialog

* Fix tests and add docs

* Fix tests on unix

* Review feedback

* Default shadowed imports to off

* Missed spot for execEnv not needing to be passed
2022-11-04 16:45:16 -07:00
Eric Traut
d5d27505ef Updated types in documentation to use PEP 604 syntax. 2022-10-24 20:06:21 -07:00
Eric Traut
8538998719 Extended the defineConstant mechanism to work with conditional statements that contain member access expressions that reference a defined member name. This addresses https://github.com/microsoft/pyright/issues/4060. 2022-10-18 15:28:17 -07:00
Eric Traut
285550c5ce Updated configuration documentation to include reportUnnecessaryContains in the table. 2022-07-17 23:42:44 -07:00