Page MenuHomeElementl

4/ Clarify return types and interfaces
ClosedPublic

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

Details

Summary

Housekeeping

Test Plan

Unit

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

I love it.

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

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
44

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.