feat: tweak pyright config

This commit is contained in:
psychedelicious 2024-01-16 19:19:49 +11:00
parent a7e23af9c6
commit cc295a9f0a

View File

@ -284,17 +284,36 @@ module = [
#=== End: MyPy #=== End: MyPy
[tool.pyright] [tool.pyright]
include = [ # Start from strict mode
"invokeai/app/invocations/" typeCheckingMode = "strict"
] # This errors whenever an import is missing a type stub file - way too noisy
exclude = [ reportMissingTypeStubs = "none"
"**/node_modules", # These are the rest of the rules enabled by strict mode - enable them @ warning
"**/__pycache__", reportConstantRedefinition = "warning"
"invokeai/app/invocations/onnx.py", reportDeprecated = "warning"
"invokeai/app/api/routers/models.py", reportDuplicateImport = "warning"
"invokeai/app/services/invocation_stats/invocation_stats_default.py", reportIncompleteStub = "warning"
"invokeai/app/services/model_manager/model_manager_base.py", reportInconsistentConstructor = "warning"
"invokeai/app/services/model_manager/model_manager_default.py", reportInvalidStubStatement = "warning"
"invokeai/app/services/model_records/model_records_sql.py", reportMatchNotExhaustive = "warning"
"invokeai/app/util/controlnet_utils.py", reportMissingParameterType = "warning"
] reportMissingTypeArgument = "warning"
reportPrivateUsage = "warning"
reportTypeCommentUsage = "warning"
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "warning"
reportUnknownMemberType = "warning"
reportUnknownParameterType = "warning"
reportUnknownVariableType = "warning"
reportUnnecessaryCast = "warning"
reportUnnecessaryComparison = "warning"
reportUnnecessaryContains = "warning"
reportUnnecessaryIsInstance = "warning"
reportUnusedClass = "warning"
reportUnusedImport = "warning"
reportUnusedFunction = "warning"
reportUnusedVariable = "warning"
reportUntypedBaseClass = "warning"
reportUntypedClassDecorator = "warning"
reportUntypedFunctionDecorator = "warning"
reportUntypedNamedTuple = "warning"