[ty] Treat declared dataclass fields as instance attributes in own_instance_member by charliermarsh · Pull Request #22965 · astral-sh/ruff (original) (raw)
mypy_primer results
Changes were detected when running on open source projects
pylox (https://github.com/sco1/pylox)
- pylox/containers/array.py:25:9: error[unresolved-attribute] Object of type
dict[Unknown, Unknown]has no attributeappend - pylox/containers/array.py:38:9: error[unresolved-attribute] Object of type
dict[Unknown, Unknown]has no attributeappendleft
- pylox/containers/array.py:25:9: warning[possibly-missing-attribute] Attribute
appendmay be missing on object of typedict[Unknown, Unknown] | Unknown | deque[Unknown | None] - pylox/containers/array.py:38:9: warning[possibly-missing-attribute] Attribute
appendleftmay be missing on object of typedict[Unknown, Unknown] | Unknown | deque[Unknown | None] - pylox/containers/array.py:69:16: error[no-matching-overload] No overload of bound method
joinmatches arguments - pylox/containers/array.py:99:20: warning[possibly-missing-attribute] Attribute
popleftmay be missing on object of typedict[Unknown, Unknown] | Unknown | deque[Unknown | None] - pylox/containers/array.py:114:9: warning[possibly-missing-attribute] Attribute
reversemay be missing on object of typedict[Unknown, Unknown] | Unknown | deque[Unknown | None]
- pylox/containers/array.py:99:20: error[unresolved-attribute] Object of type
dict[Unknown, Unknown]has no attributepopleft - pylox/containers/array.py:114:9: error[unresolved-attribute] Object of type
dict[Unknown, Unknown]has no attributereverse
- Found 48 diagnostics
- Found 47 diagnostics
pwndbg (https://github.com/pwndbg/pwndbg)
- pwndbg/aglib/kernel/init.py:264:20: error[unsupported-operator] Operator
+is not supported between objects of typeNone | UnknownandLiteral[1]
- pwndbg/aglib/kernel/init.py:264:20: error[unsupported-operator] Operator
+is not supported between objects of typeUnknown | NoneandLiteral[1]
- pwndbg/aglib/kernel/init.py:270:22: error[unsupported-operator] Operator
+is not supported between objects of typeNone | Unknownandint
- pwndbg/aglib/kernel/init.py:270:22: error[unsupported-operator] Operator
+is not supported between objects of typeUnknown | Noneandint
prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/prefect_dbt/core/settings.py:94:28: error[invalid-assignment] Object of type
dict[Any, Any] | int | dict[str, Any] | ... omitted 4 union elementsis not assignable todict[str, Any] - src/integrations/prefect-dbt/prefect_dbt/core/settings.py:99:28: error[invalid-assignment] Object of type
int | dict[Any, Any] | float | ... omitted 3 union elementsis not assignable todict[str, Any] - src/prefect/cli/deploy/_core.py:86:21: error[invalid-assignment] Object of type
dict[Any, Any] | int | dict[str, Any] | ... omitted 4 union elementsis not assignable todict[str, Any] - src/prefect/cli/deploy/_core.py:87:21: error[invalid-assignment] Object of type
int | dict[Any, Any] | float | ... omitted 3 union elementsis not assignable todict[str, Any] - src/prefect/deployments/steps/core.py:137:38: error[invalid-argument-type] Argument is incorrect: Argument type
dict[Any, Any] | int | dict[str, Any] | ... omitted 4 union elementsdoes not satisfy constraints (str,int,int | float,bool,dict[Any, Any],list[Any],None) of type variableT - src/prefect/flow_engine.py:535:20: error[invalid-return-type] Return type does not match returned value: expected
R@FlowRunEngine | State[Any] | None, found(R@FlowRunEngine & ~<class 'NotSet'> & ~Top[State[Any]] & ~Coroutine[object, Never, object]) | (type[NotSet] & ~<class 'NotSet'> & ~Coroutine[object, Never, object]) | Unknown | (PrefectFuture[Unknown] & ~Top[State[Any]] & ~Coroutine[object, Never, object]) | None
- src/prefect/flow_engine.py:535:20: error[invalid-return-type] Return type does not match returned value: expected
R@FlowRunEngine | State[Any] | None, found(R@FlowRunEngine & ~<class 'NotSet'> & ~Top[State[Any]] & ~Coroutine[object, Never, object]) | (type[NotSet] & ~<class 'NotSet'> & ~Coroutine[object, Never, object]) | Unknown
- src/prefect/flow_engine.py:539:23: error[invalid-raise] Cannot raise object of type
BaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/flow_engine.py:539:23: error[invalid-raise] Cannot raise object of type
Exception | (type[NotSet] & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/flow_engine.py:540:20: error[invalid-return-type] Return type does not match returned value: expected
R@FlowRunEngine | State[Any] | None, foundBaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>)
- src/prefect/flow_engine.py:540:20: error[invalid-return-type] Return type does not match returned value: expected
R@FlowRunEngine | State[Any] | None, foundException | (type[NotSet] & ~<class 'NotSet'>)
- src/prefect/flow_engine.py:1128:23: error[invalid-raise] Cannot raise object of type
BaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/flow_engine.py:1128:23: error[invalid-raise] Cannot raise object of type
Exception | (type[NotSet] & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/flow_engine.py:1129:20: error[invalid-return-type] Return type does not match returned value: expected
R@AsyncFlowRunEngine | State[Any] | None, foundBaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>)
- src/prefect/flow_engine.py:1129:20: error[invalid-return-type] Return type does not match returned value: expected
R@AsyncFlowRunEngine | State[Any] | None, foundException | (type[NotSet] & ~<class 'NotSet'>)
- src/prefect/task_engine.py:605:20: error[invalid-return-type] Return type does not match returned value: expected
R@SyncTaskRunEngine | State[Any] | None, found(R@SyncTaskRunEngine & ~<class 'NotSet'> & ~Top[ResultRecord[Unknown]]) | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'> & ~Top[ResultRecord[Unknown]])
- src/prefect/task_engine.py:605:20: error[invalid-return-type] Return type does not match returned value: expected
R@SyncTaskRunEngine | State[Any] | None, found(R@SyncTaskRunEngine & ~<class 'NotSet'> & ~Top[ResultRecord[Unknown]]) | (type[NotSet] & ~<class 'NotSet'>)
- src/prefect/task_engine.py:610:23: error[invalid-raise] Cannot raise object of type
BaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/task_engine.py:610:23: error[invalid-raise] Cannot raise object of type
BaseException | (type[NotSet] & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/task_engine.py:613:20: error[invalid-return-type] Return type does not match returned value: expected
R@SyncTaskRunEngine | State[Any] | None, foundBaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>)
- src/prefect/task_engine.py:613:20: error[invalid-return-type] Return type does not match returned value: expected
R@SyncTaskRunEngine | State[Any] | None, foundBaseException | (type[NotSet] & ~<class 'NotSet'>)
- src/prefect/task_engine.py:1224:20: error[invalid-return-type] Return type does not match returned value: expected
R@AsyncTaskRunEngine | State[Any] | None, found(R@AsyncTaskRunEngine & ~<class 'NotSet'> & ~Top[ResultRecord[Unknown]]) | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'> & ~Top[ResultRecord[Unknown]])
- src/prefect/task_engine.py:1224:20: error[invalid-return-type] Return type does not match returned value: expected
R@AsyncTaskRunEngine | State[Any] | None, found(R@AsyncTaskRunEngine & ~<class 'NotSet'> & ~Top[ResultRecord[Unknown]]) | (type[NotSet] & ~<class 'NotSet'>)
- src/prefect/task_engine.py:1229:23: error[invalid-raise] Cannot raise object of type
BaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/task_engine.py:1229:23: error[invalid-raise] Cannot raise object of type
BaseException | (type[NotSet] & ~<class 'NotSet'>): Not an instance or subclass ofBaseException
- src/prefect/task_engine.py:1232:20: error[invalid-return-type] Return type does not match returned value: expected
R@AsyncTaskRunEngine | State[Any] | None, foundBaseException | (type[NotSet] & ~<class 'NotSet'>) | (Unknown & ~<class 'NotSet'>)
- src/prefect/task_engine.py:1232:20: error[invalid-return-type] Return type does not match returned value: expected
R@AsyncTaskRunEngine | State[Any] | None, foundBaseException | (type[NotSet] & ~<class 'NotSet'>)
- src/prefect/utilities/templating.py:320:13: error[invalid-assignment] Invalid subscript assignment with key of type
objectand value of typeUnknown | int | dict[str, Any] | ... omitted 4 union elementson object of typedict[str, Any]
- src/prefect/utilities/templating.py:320:13: error[invalid-assignment] Invalid subscript assignment with key of type
objectand value of typeUnknown | dict[str, Any]on object of typedict[str, Any]
- src/prefect/utilities/templating.py:323:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_block_document_references | dict[str, Any], foundlist[Unknown | int | dict[str, Any] | ... omitted 4 union elements]
- src/prefect/utilities/templating.py:323:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_block_document_references | dict[str, Any], foundlist[Unknown | dict[str, Any]]
- src/prefect/utilities/templating.py:437:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, founddict[object, Unknown | int | float | ... omitted 4 union elements]
- src/prefect/utilities/templating.py:437:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, founddict[object, Unknown]
- src/prefect/utilities/templating.py:442:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, foundlist[Unknown | int | float | ... omitted 4 union elements]
- src/prefect/utilities/templating.py:442:16: error[invalid-return-type] Return type does not match returned value: expected
T@resolve_variables, foundlist[Unknown] - src/prefect/workers/base.py:232:13: error[invalid-argument-type] Argument is incorrect: Argument type
str | dict[str, Any]does not satisfy constraints (str,int,int | float,bool,dict[Any, Any],list[Any],None) of type variableT
- src/prefect/workers/base.py:232:13: error[invalid-argument-type] Argument is incorrect: Argument type
str | int | dict[str, Any] | ... omitted 3 union elementsdoes not satisfy constraints (str,int,int | float,bool,dict[Any, Any],list[Any],None) of type variableT - src/prefect/workers/base.py:234:22: error[invalid-argument-type] Argument expression after ** must be a mapping type: Found
int | Unknown | float | ... omitted 4 union elements - Found 5375 diagnostics
- Found 5369 diagnostics
egglog-python (https://github.com/egraphs-good/egglog-python)
- python/egglog/runtime.py:745:9: error[invalid-assignment] Object of type
() -> Declarationsis not assignable to attribute__egg_decls_thunk__of type() -> Declarations
- Found 1483 diagnostics
- Found 1484 diagnostics
core (https://github.com/home-assistant/core)
- homeassistant/util/variance.py:47:12: error[invalid-return-type] Return type does not match returned value: expected
(**_P@ignore_variance) -> _R@ignore_variance, found_Wrapped[_P@ignore_variance, int | _R@ignore_variance | float | datetime, _P@ignore_variance, _R@ignore_variance | int | float | datetime] - Found 14516 diagnostics
- Found 14515 diagnostics
Memory usage changes were detected when running on open source projects
trio (https://github.com/python-trio/trio)
memo metadata = ~31MB
memo metadata = ~33MB
sphinx (https://github.com/sphinx-doc/sphinx)
- TOTAL MEMORY USAGE: ~287MB
- TOTAL MEMORY USAGE: ~301MB