-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[py] correct type annotations of default-None params #15341
base: trunk
Are you sure you want to change the base?
Conversation
Used regex for search: : \w+ = None
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
Corrected type hints/annotations, mostly of arguments with default values of
None
.Also added a few entirely-missing type hints, mostly for strings.
Motivation and Context
Pyright type checker was throwing errors in many of these cases.
Types of changes
Checklist
None of the other checklist items are required.
Recommend a squash merge.
PR Type
Bug fix, Enhancement
Description
Corrected type annotations for parameters with default
None
values.Added missing type hints, primarily for strings and lists.
Improved type safety by using
Optional
and explicit type declarations.Enhanced code clarity and compatibility with type checkers like Pyright.
Changes walkthrough 📝
18 files
Updated type hints for `log_output` parameter.
Added `Optional` type hints for `options` and `service`.
Corrected type hints for
executable_path
,log_output
, anddriver_path_env_key
.Added `Optional` type hints for multiple parameters.
Updated type hint for `source` parameter.
Corrected type hints for multiple parameters including `log_output`.
Updated type hints for
executable_path
,log_output
, anddriver_path_env_key
.Added `Optional` type hints for `options` and `service`.
Corrected type hints for
executable_path
,log_output
, anddriver_path_env_key
.Added `Optional` type hints for `options` and `service`.
Updated type hints for
executable_path
,log_output
, anddriver_path_env_key
.Added `Optional` type hints for `options` and `service`.
Added `Optional` type hint for `_client_config`.
Corrected type hints for `executable_path` and `driver_path_env_key`.
Added `Optional` type hints for `options` and `service`.
Updated type hint for `execute_script` method.
Added `Optional` type hint for `service` parameter.
Added `Optional` type hint for `service` parameter.
2 files
Added type hints for `arguments` and `add_argument` methods.
Enhanced type hints for `execute` and `execute_script` methods.