[ty] Support **{...} unpacking in TypedDict constructors#24523
Draft
charliermarsh wants to merge 2 commits intomainfrom
Draft
[ty] Support **{...} unpacking in TypedDict constructors#24523charliermarsh wants to merge 2 commits intomainfrom
**{...} unpacking in TypedDict constructors#24523charliermarsh wants to merge 2 commits intomainfrom
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133. |
Memory usage reportMemory usage unchanged ✅ |
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
missing-typed-dict-key |
0 | 63 | 0 |
invalid-argument-type |
31 | 0 | 0 |
invalid-return-type |
1 | 5 | 0 |
invalid-key |
1 | 0 | 0 |
| Total | 33 | 68 | 0 |
Raw diff (101 changes)
core (https://github.com/home-assistant/core)
- homeassistant/components/energy/data.py:786:20 error[missing-typed-dict-key] Missing required key 'stat_energy_from' in TypedDict `BatterySourceType` constructor
- homeassistant/components/energy/data.py:786:20 error[missing-typed-dict-key] Missing required key 'stat_energy_to' in TypedDict `BatterySourceType` constructor
- homeassistant/components/energy/data.py:786:20 error[missing-typed-dict-key] Missing required key 'type' in TypedDict `BatterySourceType` constructor
- homeassistant/components/energy/data.py:786:20 error[invalid-return-type] Return type does not match returned value: expected `BatterySourceType`, found `dict[str, Unknown | str]`
- homeassistant/components/energy/data.py:789:16 error[missing-typed-dict-key] Missing required key 'stat_energy_from' in TypedDict `BatterySourceType` constructor
- homeassistant/components/energy/data.py:789:16 error[missing-typed-dict-key] Missing required key 'stat_energy_to' in TypedDict `BatterySourceType` constructor
- homeassistant/components/energy/data.py:789:16 error[missing-typed-dict-key] Missing required key 'type' in TypedDict `BatterySourceType` constructor
- homeassistant/components/energy/data.py:789:16 error[invalid-return-type] Return type does not match returned value: expected `BatterySourceType`, found `dict[str, Unknown | str]`
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'cost_adjustment_day' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'entity_energy_price' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'entity_energy_price_export' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'number_energy_price' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'number_energy_price_export' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'stat_compensation' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'stat_cost' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'stat_energy_from' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'stat_energy_to' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[missing-typed-dict-key] Missing required key 'type' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:804:20 error[invalid-return-type] Return type does not match returned value: expected `GridSourceType`, found `dict[str, Unknown | str]`
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'cost_adjustment_day' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'entity_energy_price' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'entity_energy_price_export' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'number_energy_price' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'number_energy_price_export' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'stat_compensation' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'stat_cost' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'stat_energy_from' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'stat_energy_to' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[missing-typed-dict-key] Missing required key 'type' in TypedDict `GridSourceType` constructor
- homeassistant/components/energy/data.py:807:16 error[invalid-return-type] Return type does not match returned value: expected `GridSourceType`, found `dict[str, Unknown | str]`
+ homeassistant/components/recorder/statistics.py:2616:12 error[invalid-return-type] Return type does not match returned value: expected `list[StatisticsRow]`, found `list[StatisticsRow | dict[str, Any | None | int | float]]`
+ homeassistant/components/recorder/statistics.py:2620:15 error[invalid-argument-type] Invalid argument to key "end" with declared type `int | float` on TypedDict `StatisticsRow`: value of type `None | int | float`
+ homeassistant/components/recorder/statistics.py:2620:15 error[invalid-argument-type] Invalid argument to key "start" with declared type `int | float` on TypedDict `StatisticsRow`: value of type `None | int | float`
cwltool (https://github.com/common-workflow-language/cwltool)
- tests/test_parallel.py:22:21 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_pathmapper.py:95:15 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/builder.py:478:41 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/command_line_tool.py:692:25 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/command_line_tool.py:1024:37 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
+ cwltool/command_line_tool.py:697:25 error[invalid-key] Unknown key "writable" for TypedDict `CWLFileType`
- cwltool/job.py:141:30 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLDirectoryType` constructor
- cwltool/main.py:597:12 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/process.py:1151:20 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLDirectoryType` constructor
- cwltool/process.py:1229:30 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/process.py:1237:28 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/process.py:1253:28 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLDirectoryType` constructor
- cwltool/process.py:1317:33 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/process.py:1341:28 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- cwltool/utils.py:351:19 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLDirectoryType` constructor
- cwltool/utils.py:362:28 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_examples.py:623:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_examples.py:624:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_examples.py:625:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_examples.py:626:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLDirectoryType` constructor
- tests/test_examples.py:636:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_examples.py:637:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLDirectoryType` constructor
- tests/test_http_input.py:17:9 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_http_input.py:61:13 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_js_sandbox.py:45:12 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_js_sandbox.py:91:16 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
- tests/test_js_sandbox.py:116:16 error[missing-typed-dict-key] Missing required key 'class' in TypedDict `CWLFileType` constructor
pydantic (https://github.com/pydantic/pydantic)
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "allow_inf_nan" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "cache_strings" with declared type `bool | Literal["all", "keys", "none"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "coerce_numbers_to_str" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "extra_fields_behavior" with declared type `Literal["allow", "forbid", "ignore"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "from_attributes" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "hide_input_in_errors" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "loc_by_alias" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "polymorphic_serialization" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "regex_engine" with declared type `Literal["rust-regex", "python-re"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "revalidate_instances" with declared type `Literal["always", "never", "subclass-instances"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "ser_json_bytes" with declared type `Literal["utf8", "base64", "hex"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "ser_json_inf_nan" with declared type `Literal["null", "constants", "strings"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "ser_json_temporal" with declared type `Literal["iso8601", "seconds", "milliseconds"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "ser_json_timedelta" with declared type `Literal["iso8601", "float"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "serialize_by_alias" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "str_max_length" with declared type `int` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "str_min_length" with declared type `int` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "str_strip_whitespace" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "str_to_lower" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "str_to_upper" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "strict" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "title" with declared type `str` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "typed_dict_total" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "url_preserve_empty_path" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "val_json_bytes" with declared type `Literal["utf8", "base64", "hex"]` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "validate_by_alias" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "validate_by_name" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "validate_default" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
+ pydantic/_internal/_config.py:202:15 error[invalid-argument-type] Invalid argument to key "validation_error_cause" with declared type `bool` on TypedDict `CoreConfig`: value of type `str | int`
pyjwt (https://github.com/jpadilla/pyjwt)
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'enforce_minimum_key_length' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'require' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'strict_aud' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_aud' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_exp' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_iat' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_iss' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_jti' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_nbf' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_signature' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[missing-typed-dict-key] Missing required key 'verify_sub' in TypedDict `FullOptions` constructor
- jwt/api_jwt.py:88:16 error[invalid-return-type] Return type does not match returned value: expected `FullOptions`, found `dict[str, Unknown]`afe37c9 to
128de59
Compare
ec96238 to
fd5aebc
Compare
128de59 to
a77b8b6
Compare
5146df9 to
1a8a844
Compare
1a8a844 to
16b7957
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.