Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We've revised the pyrightconfig.json settings in light of recent developments. The key question we have in mind is: How do we find the right balance between type checking strictness and useful error messages? The goal is to use type hints to make code clearer but not overuse them to the point where they obscure the logic of the code itself. Always remember you read code a lot more often than you write it. Therefore you should optimize for ease of reading. To this end we improved the typing of another codebase by tightening up the checks but not making them too tight. The main changes was to change the `typeCheckingMode` to "standard" [1]. This adds a few more checks over "basic" type checking mode, but not as many as "strict". However some of the checks in "strict" are still useful like: - reportMissingParameterType - reportPropertyTypeMismatch - reportUnnecessaryComparison These have been explicitly set to "error" in the pyrightconfig.json, otherwise they would be set to "none" (in "standard" mode) and we wouldn't see these errors. Any settings that default to "error" in "standard' type checking mode have been removed from the pyrightconfig.json file as they aren't necessary. [1] https://github.com/microsoft/pyright/blob/main/docs/configuration.md
- Loading branch information