coc-basedpyright
Heyward FannBasedpyright(fork of Pyright) extension for coc.nvim
Published Package Summary
coc-basedpyright
Basedpyright, a fork of Pyright with various type checking improvements and features, extension for coc.nvim.
Install
:CocInstall coc-basedpyright
pyrightconfig.json
Pyright/Basedpyright supports pyrightconfig.json that provide granular control over settings.
License
MIT
This extension is built with create-coc-extension
- Basedpyright(fork of Pyright) extension for coc.nvim
- onLanguage:python
- workspaceContains:app.py
- workspaceContains:Pipfile
- workspaceContains:setup.py
- workspaceContains:manage.py
- workspaceContains:pyproject.toml
- workspaceContains:requirements.txt
- workspaceContains:pyrightconfig.json
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-basedpyright@1.31.0.
| Command (:CocCommand) | Description |
|---|---|
| basedpyright.organizeimports | Organize Imports by basedpyright |
| basedpyright.restartserver | Restart Server |
| basedpyright.createtypestub | Creates Type Stubs with given module name |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "",
"description": "Path to folder with a list of Virtual Environments."
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "python",
"description": "Path to Python, you can use a custom version of Python."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable coc-basedpyright extension"
}Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"scope": "window",
"default": "off",
"description": "Trace requests to basedpyright",
"enumDescriptions": [
"No traces",
"Error only",
"Full log"
]
}Raw JSON Schema
{
"enum": [
"fromEnvironment",
"useBundled"
],
"type": "string",
"scope": "resource",
"default": "fromEnvironment",
"description": "Whether to use the version of pyright installed in the project (recommended) or the one bundled with the extension (not recommended)."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Paths of directories or files whose diagnostic output (errors and warnings) should be suppressed even if they are an included file or within the transitive closure of an included file. Paths may contain wildcard characters ** (a directory or multiple levels of directories), * (a sequence of zero or more characters), or ? (a single character). If no value is provided, the value of python.linting.ignorePatterns (if set) will be used."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Paths of directories or files that should not be included. These override the include directories, allowing specific subdirectories to be excluded. Note that files in the exclude paths may still be included in the analysis if they are referenced (imported) by source files that are not excluded. Paths may contain wildcard characters ** (a directory or multiple levels of directories), * (a sequence of zero or more characters), or ? (a single character). If no exclude paths are specified, pyright automatically excludes the following: `**/node_modules`, `**/__pycache__`, `.git` and any virtual environment directories."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Paths of directories or files that should be included. If no paths are specified, pyright defaults to the workspace root directory. Paths may contain wildcard characters ** (a directory or multiple levels of directories), * (a sequence of zero or more characters), or ? (a single character)."
}Raw JSON Schema
{
"enum": [
"Error",
"Warning",
"Information",
"Trace"
],
"type": "string",
"default": "Information",
"description": "Specifies the level of logging for the Output panel"
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "typings",
"description": "Path to directory containing custom type stub files."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"description": "Disable hint diagnostics with special hints for grayed-out or strike-through text."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Additional import search resolution paths"
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Paths to look for typeshed modules."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"description": "Disables the “Organize Imports” command."
}Raw JSON Schema
{
"enum": [
"openFilesOnly",
"workspace"
],
"type": "string",
"scope": "resource",
"default": "openFilesOnly",
"enumDescriptions": [
"Analyzes and reports errors on only open files.",
"Analyzes and reports errors on all files in the workspace."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"description": "Disables type completion, definitions, and references."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Automatically add common search paths like 'src'?"
}Raw JSON Schema
{
"enum": [
"off",
"basic",
"standard",
"strict",
"recommended",
"all"
],
"type": "string",
"scope": "resource",
"default": "recommended",
"description": "Defines the default rule set for type checking."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Offer auto-import completions."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Use library implementations to extract type information when type stub is not present."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"description": "Whether to show inlay hints on inferred generic types."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Whether to show inlay hints on assignments to variables."
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"properties": {
"reportAny": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for expressions with the `Any` type"
},
"reportCallIssue": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for issues involving call expressions and arguments."
},
"reportDeprecated": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for use of deprecated classes or functions."
},
"reportIndexIssue": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics related to index operations and expressions."
},
"reportReturnType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics related to function return type compatibility."
},
"reportUnhashable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for the use of an unhashable object in a container that requires hashability."
},
"reportExplicitAny": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for type annotations that use the `Any` type"
},
"reportInvalidCast": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for `cast`s to non-overlapping types"
},
"reportUnreachable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for unreachable code."
},
"reportUnusedClass": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for a class with a private name (starting with an underscore) that is not accessed."
},
"reportArgumentType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for a type incompatibility for an argument to a call."
},
"reportImportCycles": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for cyclical import chains. These are not errors in Python, but they do slow down type analysis and often hint at architectural layering issues. Generally, they should be avoided."
},
"reportOptionalCall": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to call a variable with an Optional type."
},
"reportPrivateUsage": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for incorrect usage of private or protected variables or functions. Protected class members begin with a single underscore _ and can be accessed only by subclasses. Private class members begin with a double underscore but do not end in a double underscore and can be accessed only within the declaring class. Variables and functions declared outside of a class are considered private if their names start with either a single or double underscore, and they cannot be accessed outside of the declaring module."
},
"reportUnusedExcept": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for unreachable except clause."
},
"reportUnusedImport": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for an imported symbol that is not referenced within that file."
},
"reportAbstractUsage": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to instantiate an abstract or protocol class or use an abstract method."
},
"reportOperatorIssue": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for related to unary or binary operators."
},
"reportRedeclaration": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to declare the type of a symbol multiple times."
},
"reportAssignmentType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for type incompatibilities for assignments."
},
"reportIncompleteStub": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for the use of a module-level “__getattr__” function, indicating that the stub is incomplete."
},
"reportMissingImports": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for imports that have no corresponding imported python file or type stub file."
},
"reportUnusedFunction": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for a function or method with a private name (starting with an underscore) that is not accessed."
},
"reportUnusedVariable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for a variable that is not accessed."
},
"reportDuplicateImport": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for an imported symbol or module that is imported more than once."
},
"reportInvalidTypeForm": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for type expression that uses an invalid form."
},
"reportOptionalOperand": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to use an Optional type as an operand to a binary or unary operator (like '+', '==', 'or', 'not')."
},
"reportShadowedImports": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for files that are overriding a module in the stdlib."
},
"reportUnboundVariable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for the use of unbound variables."
},
"reportUnnecessaryCast": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for 'cast' calls that are statically determined to be unnecessary. Such calls are sometimes indicative of a programming error."
},
"reportUnusedCoroutine": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for call expressions that return a Coroutine and whose results are not consumed."
},
"reportUnusedParameter": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "hint",
"description": "Diagnostics for unused function parameters"
},
"reportAssertAlwaysTrue": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for 'assert' statement that will provably always assert. This can be indicative of a programming error."
},
"reportImplicitOverride": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for overridden methods that do not include an `@override` decorator."
},
"reportMissingSuperCall": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for missing call to parent class for inherited `__init__` methods."
},
"reportMissingTypeStubs": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for imports that have no corresponding type stub file (either a typeshed file or a custom type stub). The type checker requires type stubs to do its best job at analysis."
},
"reportOptionalIterable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to use an Optional type as an iterable value (e.g. within a for statement)."
},
"reportTypeCommentUsage": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for usage of deprecated type comments."
},
"reportUntypedBaseClass": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for base classes whose type cannot be determined statically. These obscure the class type, defeating many type analysis features."
},
"reportUnusedCallResult": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for call expressions whose results are not consumed and are not None."
},
"reportUnusedExpression": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for simple expressions whose value is not used in any way."
},
"reportAssertTypeFailure": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for a type incompatibility detected by a typing.assert_type call."
},
"reportGeneralTypeIssues": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for general type inconsistencies, unsupported operations, argument/parameter mismatches, etc. Covers all of the basic type-checking rules not covered by other rules. Does not include syntax errors."
},
"reportInvalidTypeVarUse": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for improper use of type variables in a function signature."
},
"reportOptionalSubscript": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to subscript (index) a variable with an Optional type."
},
"reportUndefinedVariable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for undefined variables."
},
"reportUnknownLambdaType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for input or return parameters for lambdas that have an unknown type."
},
"reportUnknownMemberType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for class or instance variables that have an unknown type."
},
"reportUntypedNamedTuple": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics when “namedtuple” is used rather than “NamedTuple”. The former contains no type information, whereas the latter does."
},
"reportMatchNotExhaustive": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for 'match' statements that do not exhaustively match all possible values."
},
"reportPrivateImportUsage": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for incorrect usage of symbol imported from a \"py.typed\" module that is not re-exported from that module."
},
"reportMissingModuleSource": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for imports that have no corresponding source file. This happens when a type stub is found, but the module source file was not found, indicating that the code may fail at runtime when using this execution environment. Type checking will be done using the type stub."
},
"reportMissingTypeArgument": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for generic class reference with missing type arguments."
},
"reportOverlappingOverload": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for function overloads that overlap in signature and obscure each other or have incompatible return types."
},
"reportUnknownArgumentType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for call arguments for functions or methods that have an unknown type."
},
"reportUnknownVariableType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for variables that have an unknown type.."
},
"reportUnnecessaryContains": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for 'in' operation that is statically determined to be unnecessary. Such operations are sometimes indicative of a programming error."
},
"reportAttributeAccessIssue": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for issues involving attribute accesses."
},
"reportConstantRedefinition": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for attempts to redefine variables whose names are all-caps with underscores and numerals."
},
"reportFunctionMemberAccess": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for member accesses on functions."
},
"reportInconsistentOverload": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for inconsistencies between function overload signatures and implementation."
},
"reportInvalidStubStatement": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for type stub statements that do not conform to PEP 484."
},
"reportInvalidTypeArguments": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for invalid type argument usage."
},
"reportMissingParameterType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for parameters that are missing a type annotation."
},
"reportOptionalMemberAccess": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to access a member of a variable with an Optional type."
},
"reportPropertyTypeMismatch": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for property whose setter and getter have mismatched types."
},
"reportSelfClsParameterName": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for a missing or misnamed “self” parameter in instance methods and “cls” parameter in class methods. Instance methods in metaclasses (classes that derive from “type”) are allowed to use “cls” for instance methods."
},
"reportUnknownParameterType": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for input or return parameters for functions or methods that have an unknown type."
},
"reportUnsupportedDunderAll": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for unsupported operations performed on __all__."
},
"reportImplicitAbstractClass": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for abstract classes that do not explicitly extend `ABC`"
},
"reportUnnecessaryComparison": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for '==' and '!=' comparisons that are statically determined to be unnecessary. Such calls are sometimes indicative of a programming error."
},
"reportUnnecessaryIsInstance": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for 'isinstance' or 'issubclass' calls where the result is statically determined to be always (or never) true. Such calls are often indicative of a programming error."
},
"reportUntypedClassDecorator": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for class decorators that have no type annotations. These obscure the class type, defeating many type analysis features."
},
"reportImplicitRelativeImport": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for non-relative imports that do not specify the full path to the module"
},
"reportOptionalContextManager": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to use an Optional type as a context manager (as a parameter to a with statement)."
},
"reportInconsistentConstructor": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for __init__ and __new__ methods whose signatures are inconsistent."
},
"reportPossiblyUnboundVariable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for the use of variables that may be unbound on some code paths."
},
"reportPrivateLocalImportUsage": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for incorrect usage of symbol imported from a non-\"py.typed\" module that is not re-exported from that module. Should be used along with `reportNonPrivateImportUsage`"
},
"reportCallInDefaultInitializer": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for function calls within a default value initialization expression. Such calls can mask expensive operations that are performed at module initialization time."
},
"reportIgnoreCommentWithoutRule": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for `# type: ignore` and `# pyright: ignore` comments without specifying a rule"
},
"reportNoOverloadImplementation": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an overloaded function or method with a missing implementation."
},
"reportUntypedFunctionDecorator": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for function decorators that have no type annotations. These obscure the function type, defeating many type analysis features."
},
"reportUnannotatedClassAttribute": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for class variable declarations that do not have a type annotation, which is required due to performance reasons for strict validation of subclasses"
},
"reportUnsafeMultipleInheritance": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for multiple inheritance where a base class's constructor may not get called"
},
"reportWildcardImportFromLibrary": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for an wildcard import from an external library."
},
"reportIncompatibleMethodOverride": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for methods that override a method of the same name in a base class in an incompatible manner (wrong number of parameters, incompatible parameter types, or incompatible return type)."
},
"reportTypedDictNotRequiredAccess": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for an attempt to access a non-required key within a TypedDict without a check for its presence."
},
"reportImplicitStringConcatenation": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for two or more string literals that follow each other, indicating an implicit concatenation. This is considered a bad practice and often masks bugs such as missing commas."
},
"reportInvalidStringEscapeSequence": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "warning",
"description": "Diagnostics for invalid escape sequences used within string literals. The Python specification indicates that such sequences will generate a syntax error in future versions."
},
"reportIncompatibleVariableOverride": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "error",
"description": "Diagnostics for overrides in subclasses that redefine a variable in an incompatible way."
},
"reportUnnecessaryTypeIgnoreComment": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for '# type: ignore' comments that have no effect."
},
"reportUninitializedInstanceVariable": {
"enum": [
"none",
"hint",
"information",
"warning",
"error",
true,
false
],
"type": [
"string",
"boolean"
],
"default": "none",
"description": "Diagnostics for instance variables that are not declared or initialized within class body or `__init__` method."
}
},
"description": "Allows a user to override the severity levels for individual diagnostics. Use the rule name as a key and one of \"error\", \"warning\", \"information\", \"none\", `true` (alias for \"error\") or `false` (alias for \"none\") as value. The default value shown for each diagnostic is the default when \"basedpyright.analysis.typeCheckingMode\" is set to \"standard\". See [here](https://github.com/detachhead/basedpyright/blob/main/docs/configuration.md#diagnostic-rule-defaults) for defaults for each type checking mode (\"off\", \"basic\", \"standard\", \"strict\", and \"all\")."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Whether to show inlay hints on function arguments."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Whether to show inlay hints on function return types."
}

