You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type hints across the main flask-wtf codebase to enhance type safety and maintainability. This is the part 1, if acceptable, I will add the rest that includes type hints in recaptcha codebase.
Checklist:
Add Type Hints to main codebase.
Add Type hints to recaptcha codebase
Add Type hints to tests
Apply modern X | Y syntax
Update pyproject.toml adding mypy and pyright cfgs
After adding mypy and pyright, I'm seeing more type errors, primarily due to type compatibility issues with the main WTForms library. Should I try to resolve these type conflicts, or would it be better to adjust the type checking settings? I'm open to any suggestions on how to handle this.
Don't adjust the type checking settings. MyPy strict must pass. Pyright standard should pass, but can be lowered to basic if absolutely necessary. Pyright --verifytypes must pass. You can add specific ignore comments in if it's otherwise impossible to satisfy MyPy. If WTForms annotations need fixes, submit a fix there as well. But I can't say more without specific examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type hints across the main flask-wtf codebase to enhance type safety and maintainability. This is the part 1, if acceptable, I will add the rest that includes type hints in recaptcha codebase.
Checklist:
testsX | Ysyntaxpyproject.tomladding mypy and pyright cfgs