[ty] Add IDE autofixes for two "Did you mean...?" suggestions by AlexWaygood · Pull Request #21667 · astral-sh/ruff (original) (raw)
mypy_primer results
Changes were detected when running on open source projects
beartype (https://github.com/beartype/beartype)
- beartype/claw/_package/clawpkgtrie.py:66:29: warning[unsupported-base] Unsupported class base with type
<class 'dict[str, PackagesTrieBlacklist]'> | <class 'dict[str, Divergent]'> - beartype/claw/_package/clawpkgtrie.py:247:29: warning[unsupported-base] Unsupported class base with type
<class 'dict[str, PackagesTrieWhitelist]'> | <class 'dict[str, Divergent]'>
- Found 505 diagnostics
- Found 507 diagnostics
rotki (https://github.com/rotki/rotki)
- rotkehlchen/accounting/structures/processed_event.py:85:75: warning[unused-ignore-comment] Unused blanket
type: ignoredirective - rotkehlchen/api/rest.py:1039:73: warning[unused-ignore-comment] Unused blanket
type: ignoredirective
- rotkehlchen/api/rest.py:2896:25: error[invalid-argument-type] Argument to function
reset_events_for_redecodeis incorrect: ExpectedLiteral[Location.ETHEREUM, Location.OPTIMISM, Location.POLYGON_POS, Location.ARBITRUM_ONE, Location.BASE, ... omitted 7 literals], foundLocation | Unknown
- Found 2042 diagnostics
- Found 2041 diagnostics
pydantic (https://github.com/pydantic/pydantic)
- pydantic/fields.py:943:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:943:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:983:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:983:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1026:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1026:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1066:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1066:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1109:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1109:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1148:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1148:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1188:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None
- pydantic/fields.py:1188:5: error[invalid-parameter-default] Default value of type
PydanticUndefinedTypeis not assignable to annotated parameter typedict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None
- pydantic/fields.py:1567:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None, foundTop[dict[Unknown, Unknown]] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None
- pydantic/fields.py:1567:13: error[invalid-argument-type] Argument is incorrect: Expected
dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None, foundTop[dict[Unknown, Unknown]] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None
No memory usage changes detected ✅