Page MenuHomePhabricator

4/ Clarify return types and interfaces
ClosedPublic

Authored by max on Wed, Jan 13, 7:51 PM.

Details

Summary

Housekeeping

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

max requested review of this revision.Wed, Jan 13, 8:09 PM
This revision is now accepted and ready to land.Wed, Jan 13, 9:06 PM

I love it.

python_modules/dagster/dagster/core/execution/context/compute.py
43

This will be a ScopedResources object. ScopedResources is a type that's generated inside a function, so doesn't make sense to include annotate here, but something we could do is:

  • Define an interface that the generated ScopedResource classes extend
  • Include some documentation on that interface
  • Mark that interface as the return type here
python_modules/dagster/dagster/core/execution/context/compute.py
43

yeah that'd be helpful at some point -- i'll open an issue -- i think to do it right might involve a fair amount of typing magic

This revision was automatically updated to reflect the committed changes.