8000 Simplify `pyrightconfig.json` , add missing comments and extra strict settings in all pyright configs by Avasam · Pull Request #9714 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Simplify pyrightconfig.json , add missing comments and extra strict settings in all pyright configs #9714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Simplify configs and add missing comments
  • Loading branch information
Avasam committed Feb 11, 2023
commit a06a29316d67e57d48211e1e46889fca6ac98d38
34 changes: 8 additions & 26 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,14 @@
// test cases use a custom config file
"stubs/**/@tests/test_cases"
],
"typeCheckingMode": "basic",
"strictListInference": true,
"strictDictionaryInference": true,
"strictSetInference": true,
"reportFunctionMemberAccess": "error",
"reportMissingTypeStubs": "error",
"reportUnusedImport": "error",
"reportUnusedClass": "error",
"reportUnusedFunction": "error",
"reportUnusedVariable": "error",
"reportDuplicateImport": "error",
"reportUntypedFunctionDecorator": "error",
"reportUntypedClassDecorator": "error",
"reportUntypedBaseClass": "error",
"reportUntypedNamedTuple": "error",
"reportConstantRedefinition": "error",
"reportInvalidStringEscapeSequence": " 10000 ;error",
"reportUnknownArgumentType": "error",
"reportUnknownLambdaType": "error",
"reportMissingTypeArgument": "error",
"reportInvalidStubStatement": "error",
"reportInvalidTypeVarUse": "error",
"reportUnsupportedDunderAll": "error",
"reportInconsistentConstructor": "error",
"reportTypeCommentUsage": "error",
"reportUnnecessaryComparison": "error",
"typeCheckingMode": "strict",
// Allowed in base settings for incomplete stubs, checked in stricter settings
"reportIncompleteStub": "none",
"reportMissingParameterType": "none",
"reportUnknownMemberType": "none",
"reportUnknownParameterType": "none",
"reportUnknownVariableType": "none",
// Extra strict settings
"reportUnnecessaryTypeIgnoreComment": "error",
// Leave "type: ignore" comments to mypy
"enableTypeIgnoreComments": false,
Expand Down
5 changes: 3 additions & 2 deletions pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@
"stubs/vobject",
],
"typeCheckingMode": "strict",
// TODO: Complete incomplete stubs
"reportIncompleteStub": "none",
// Extra strict settings
"reportUnnecessaryTypeIgnoreComment": "error",
// Leave "type: ignore" comments to mypy
"enableTypeIgnoreComments": false,
// Stubs are allowed to use private variables
"reportPrivateUsage": "none",
// TODO: Complete incomplete stubs
"reportIncompleteStub": "none",
// Stubs don't need the actual modules to be installed
"reportMissingModuleSource": "none",
// Incompatible overrides and property type mismatches are out of typeshed's control
Expand Down
7 changes: 5 additions & 2 deletions pyrightconfig.testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
"stubs/**/@tests/test_cases"
],
"typeCheckingMode": "strict",
// Extra strict settings
"reportPropertyTypeMismatch": "error",
"reportUnnecessaryTypeIgnoreComment": "error",
// Using unspecific "type ignore" comments in test_cases.
// See https://github.com/python/typeshed/pull/8083
"enableTypeIgnoreComments": true,
"reportPropertyTypeMismatch": "error",
"reportUnnecessaryTypeIgnoreComment": "error",
// Stubs don't need the actual modules to be installed
"reportMissingModuleSource": "none",
// Stubs are allowed to use private variables. We may want to test those.
"reportPrivateUsage": "none",
// isinstance checks are still needed when validating inputs outside of typeshed's control
"reportUnnecessaryIsInstance": "none",
Expand Down
0