textual-paint/pyrightconfig.json

98 lines
3.8 KiB
JSON

{
"include": [
"**/*.py",
],
"exclude": [
"**/node_modules",
"**/__pycache__",
"**/build",
"**/.*"
],
"strict": [
// "**/*.py"
],
"pythonVersion": "3.10",
// CUSTOMIZATIONS
"reportOptionalMemberAccess": "warning",
// reportUnknownMemberType caused numerous bogus errors,
// with Textual's generic App[ResultType] and Screen[ScreenResultType] classes.
"reportUnknownMemberType": false,
"reportUnnecessaryTypeIgnoreComment": "information",
// STRICT PROFILE
// As far as I know, there's no way to inherit from strict and then loosen any rules,
// so I've copied from the table and am commenting out the ones I want to change.
// https://github.com/microsoft/pyright/blob/2a096860c11dff7bbda92f92efb0216e2580c2c6/docs/configuration.md#diagnostic-rule-defaults
// > In strict type checking mode, overrides may only increase the severity level (e.g. from "warning" to "error").
"strictListInference": true,
"strictDictionaryInference": true,
"strictSetInference": true,
"analyzeUnannotatedFunctions": true,
"strictParameterNoneValue": true,
"enableTypeIgnoreComments": true,
"reportMissingModuleSource": "warning",
"reportMissingImports": "error",
"reportUndefinedVariable": "error",
"reportAssertAlwaysTrue": "error",
"reportInvalidStringEscapeSequence": "error",
"reportInvalidTypeVarUse": "error",
"reportMissingTypeStubs": "error",
"reportSelfClsParameterName": "error",
"reportUnsupportedDunderAll": "error",
"reportUnusedExpression": "error",
"reportWildcardImportFromLibrary": "error",
"reportGeneralTypeIssues": "error",
"reportOptionalSubscript": "error",
// "reportOptionalMemberAccess": "error",
"reportOptionalCall": "error",
"reportOptionalIterable": "error",
"reportOptionalContextManager": "error",
"reportOptionalOperand": "error",
"reportTypedDictNotRequiredAccess": "error",
"reportPrivateImportUsage": "error",
"reportUnboundVariable": "error",
"reportUnusedCoroutine": "error",
"reportConstantRedefinition": "error",
"reportDeprecated": "error",
"reportDuplicateImport": "error",
"reportFunctionMemberAccess": "error",
"reportIncompatibleMethodOverride": "error",
"reportIncompatibleVariableOverride": "error",
"reportIncompleteStub": "error",
"reportInconsistentConstructor": "error",
"reportInvalidStubStatement": "error",
"reportMatchNotExhaustive": "error",
"reportMissingParameterType": "error",
"reportMissingTypeArgument": "error",
"reportOverlappingOverload": "error",
"reportPrivateUsage": "error",
"reportTypeCommentUsage": "error",
"reportUnknownArgumentType": "error",
"reportUnknownLambdaType": "error",
// "reportUnknownMemberType": "error",
"reportUnknownParameterType": "error",
"reportUnknownVariableType": "error",
"reportUnnecessaryCast": "error",
"reportUnnecessaryComparison": "error",
"reportUnnecessaryContains": "error",
"reportUnnecessaryIsInstance": "error",
"reportUnusedClass": "error",
"reportUnusedImport": "error",
"reportUnusedFunction": "error",
"reportUnusedVariable": "error",
"reportUntypedBaseClass": "error",
"reportUntypedClassDecorator": "error",
"reportUntypedFunctionDecorator": "error",
"reportUntypedNamedTuple": "error",
"reportCallInDefaultInitializer": "none",
"reportImplicitOverride": "none",
"reportImplicitStringConcatenation": "none",
"reportImportCycles": "none",
"reportMissingSuperCall": "none",
"reportPropertyTypeMismatch": "none",
"reportShadowedImports": "none",
"reportUninitializedInstanceVariable": "none",
// "reportUnnecessaryTypeIgnoreComment": "none",
"reportUnusedCallResult": "none",
}