Page MenuHomePhabricator

Fix runtime type comparison
ClosedPublic

Authored by sashank on Mon, Jan 13, 6:12 PM.

Details

Summary

Since we removed runtime type singletons, direct equality checks on runtime types do not work. This diff adds a __eq__ to RuntimeType to fix this.

Test Plan

unit

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sashank created this revision.Mon, Jan 13, 6:12 PM
alangenfeld resigned from this revision.Mon, Jan 13, 7:01 PM

defer to @schrockn since I think i missed the last part of the convo on determining the best approach

python_modules/dagster/dagster_tests/core_tests/runtime_types_tests/test_runtime_types.py
114โ€“119

throw some nots in the mix?

sashank updated this revision to Diff 8653.Mon, Jan 13, 7:15 PM
  • Update __eq__ on RuntimeType to recursively check class and inner_types
  • Remove __hash__ on RuntimeType
  • Add inner_types to Tuple, Dict, and Set
sashank edited the summary of this revision. (Show Details)Mon, Jan 13, 7:16 PM
sashank marked an inline comment as done.
sashank added inline comments.
python_modules/dagster/dagster_tests/core_tests/runtime_types_tests/test_runtime_types.py
114โ€“119

๐Ÿ‘

This revision is now accepted and ready to land.Mon, Jan 13, 7:22 PM
sashank updated this revision to Diff 8659.Mon, Jan 13, 7:39 PM
sashank marked an inline comment as done.

Rebase on RFC D1832

This revision was automatically updated to reflect the committed changes.