@@ -9,29 +9,22 @@ exclude = [
99
1010pythonVersion = " 3.12"
1111pythonPlatform = " All"
12+
13+
14+ # strict doesn't allow turning off / downgrading severity of rules
1215typeCheckingMode = " standard"
13- analyzeUnannotatedFunctions = true
16+
17+ # type issues
1418disableBytesTypePromotions = true
1519strictParameterNoneValue = true
16- enableTypeIgnoreComments = true
17- enableReachabilityAnalysis = true
18- strictListInference = true
19- strictDictionaryInference = true
20- strictSetInference = true
21- deprecateTypingAliases = false
22- enableExperimentalFeatures = false
2320reportMissingTypeStubs = " error"
2421reportMissingModuleSource = " warning"
2522reportInvalidTypeForm = " error"
2623reportMissingImports = " error"
2724reportUndefinedVariable = " error"
28- reportAssertAlwaysTrue = " none"
29- reportInvalidStringEscapeSequence = " error"
3025reportInvalidTypeVarUse = " error"
3126reportSelfClsParameterName = " error"
32- reportUnsupportedDunderAll = " error"
33- reportUnusedExpression = " warning"
34- reportWildcardImportFromLibrary = " error"
27+
3528reportAbstractUsage = " error"
3629reportArgumentType = " error"
3730reportAssertTypeFailure = " error"
@@ -50,13 +43,9 @@ reportOptionalCall = "error"
5043reportOptionalIterable = " error"
5144reportOptionalContextManager = " error"
5245reportOptionalOperand = " error"
53- reportRedeclaration = " error"
5446reportReturnType = " error"
5547reportTypedDictNotRequiredAccess = " error"
56- reportPrivateImportUsage = " warning"
57- reportUnboundVariable = " error"
5848reportUnhashable = " error"
59- reportUnusedCoroutine = " warning"
6049reportUnusedExcept = " error"
6150reportFunctionMemberAccess = " error"
6251reportIncompatibleMethodOverride = " error"
@@ -65,42 +54,85 @@ reportOverlappingOverload = "error"
6554reportPossiblyUnboundVariable = " error"
6655reportConstantRedefinition = " error"
6756reportDeprecated = " warning"
68- reportDuplicateImport = " none "
57+
6958reportIncompleteStub = " error"
7059reportInconsistentConstructor = " error"
7160reportInvalidStubStatement = " error"
7261reportMatchNotExhaustive = " error"
7362reportMissingParameterType = " error"
74- reportMissingTypeArgument = " error"
75- reportPrivateUsage = " warning"
76- reportTypeCommentUsage = " error"
63+
7764reportUnknownArgumentType = " error"
7865reportUnknownLambdaType = " error"
7966reportUnknownMemberType = " error"
8067reportUnknownParameterType = " error"
8168reportUnknownVariableType = " error"
8269reportUnnecessaryCast = " warning"
70+
71+ reportCallInDefaultInitializer = " warning"
72+ reportMissingSuperCall = " none"
73+ reportPropertyTypeMismatch = " error"
74+
75+ # other type-issues
76+
77+ reportUntypedBaseClass = " warning" # spec says treat this as Any
78+ reportUntypedClassDecorator = " warning" # spec says (Any) -> Any
79+ reportUntypedFunctionDecorator = " warning" # spec says (Any) -> Any
80+ reportUntypedNamedTuple = " none" # Just no.
81+
82+ # not type issues, even if pyright and mypy offer checks as if they were
83+ # by calling them "Strict mode checks"
84+ # these are "opinionated errors with well-defined type interpretation"
85+
86+ reportImplicitOverride = " none"
87+ reportMissingTypeArgument = " none"
88+ deprecateTypingAliases = false
8389reportUnnecessaryComparison = " none"
8490reportUnnecessaryContains = " none"
8591reportUnnecessaryIsInstance = " none"
92+ reportAssertAlwaysTrue = " none"
93+ reportTypeCommentUsage = " none"
94+
95+ # reasonably preventing accidents
96+
97+ reportUnnecessaryTypeIgnoreComment = " warning"
98+
99+ reportUnsupportedDunderAll = " error"
100+ reportWildcardImportFromLibrary = " error"
101+ reportShadowedImports = " warning"
102+
103+ reportUninitializedInstanceVariable = " warning"
104+ reportUnusedCoroutine = " warning"
105+ reportUnusedExpression = " warning"
106+
107+ reportPrivateUsage = " warning"
108+ reportPrivateImportUsage = " warning"
109+
110+ reportInvalidStringEscapeSequence = " error"
111+ reportRedeclaration = " error"
112+ reportUnboundVariable = " error"
113+
86114reportUnusedClass = " warning"
87115reportUnusedImport = " warning"
88116reportUnusedFunction = " warning"
89117reportUnusedVariable = " warning"
90- reportUntypedBaseClass = " error"
91- reportUntypedClassDecorator = " error"
92- reportUntypedFunctionDecorator = " error"
93- reportUntypedNamedTuple = " warning"
94- reportCallInDefaultInitializer = " warning"
95- reportImplicitOverride = " none"
96- reportImplicitStringConcatenation = " warning"
118+
119+ # analysis behavior
120+ enableTypeIgnoreComments = true
121+ enableReachabilityAnalysis = true
122+ analyzeUnannotatedFunctions = true
97123reportImportCycles = " error"
98- reportMissingSuperCall = " none"
99- reportPropertyTypeMismatch = " error"
100- reportShadowedImports = " error"
101- reportUninitializedInstanceVariable = " error"
102- reportUnnecessaryTypeIgnoreComment = " warning"
124+ enableExperimentalFeatures = false
125+
126+ # inference settings
127+ strictListInference = true
128+ strictDictionaryInference = true
129+ strictSetInference = true
130+
131+ # overly-worriesome linter-esque options
132+ reportImplicitStringConcatenation = " none"
103133reportUnusedCallResult = " none"
134+ reportDuplicateImport = " none" # handled by ruff
135+
104136
105137
106138[tool .ruff ]
0 commit comments