diff --git a/cspell.json b/cspell.json index 97468b2..427c945 100644 --- a/cspell.json +++ b/cspell.json @@ -39,6 +39,7 @@ "disambiguates", "dockable", "domtree", + "Dunder", "emacsclient", "executablepath", "Figlet", diff --git a/pyrightconfig.json b/pyrightconfig.json index 080d70b..b16616d 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -9,7 +9,88 @@ "**/.*" ], "strict": [ - "**/*.py" + // "**/*.py" ], - "reportOptionalMemberAccess": false + + // CUSTOMIZATIONS + "reportOptionalMemberAccess": "warning", + // reportUnknownMemberType caused numerous bogus errors, + // with Textual's generic App[ResultType] and Screen[ScreenResultType] classes. + "reportUnknownMemberType": false, + + // 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", } \ No newline at end of file