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
This file contains 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
Enable warnings for unreachable code after type analysis
Consider setting warn_unreachable to True to enable warnings for unreachable code after type analysis, which can help identify logical errors or redundant code.
Why: Setting warn_unreachable to True helps identify logical errors or redundant code, which can improve code quality and maintainability.
8
Best practice
Enable type enforcement on all function definitions
Consider enabling disallow_untyped_defs to enforce type annotations on all functions. This can significantly improve code quality and maintainability by ensuring that all functions are properly typed.
Why: Enabling disallow_untyped_defs can improve code quality and maintainability by ensuring all functions are properly typed. However, it may require significant refactoring if the codebase has many untyped functions.
7
Prevent untyped function calls from typed functions
Enable disallow_untyped_calls to prevent calling functions without type annotations from typed functions, enhancing the reliability and type-safety of the code.
Why: Enabling disallow_untyped_calls enhances the reliability and type-safety of the code, but it may require extensive changes if there are many untyped function calls in the codebase.
7
Ensure complete type annotations for functions
It's recommended to enable disallow_incomplete_defs to ensure that all functions with type annotations are fully annotated, promoting more robust type checking.
Why: Enabling disallow_incomplete_defs promotes more robust type checking by ensuring all functions with type annotations are fully annotated. This can improve code reliability but may require additional effort to fully annotate existing functions.
@diemol there are some tests failing (BiDi) which i think are not related to the configuration changes that i have made for mypy in pyproject.toml can you please help me out in this. Thanks.
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.
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Moved all mypy settings from
mypy.ini
file topyproject.toml
.Motivation and Context
All mypy configurations can be accommodated in
pyproject.toml
file. This eliminates a separate configuration file for mypy settings.Types of changes
Checklist
PR Type
Enhancement, Configuration changes
Description
mypy.ini
topyproject.toml
.mypy.ini
file.pyproject.toml
.Changes walkthrough 📝
mypy.ini
Removed `mypy.ini` configuration file
py/mypy.ini
mypy.ini
configuration file.pyproject.toml
Added mypy settings to `pyproject.toml`
py/pyproject.toml
pyproject.toml
.