-
Notifications
You must be signed in to change notification settings - Fork 12
/
pyrightconfig.json
98 lines (96 loc) · 3.78 KB
/
pyrightconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"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",
}