proofit404 / stories

Service objects designed with OOP in mind.
https://proofit404.github.io/stories/
BSD 2-Clause "Simplified" License
296 stars 21 forks source link

Story steps should be of the same kind. #675

Closed proofit404 closed 1 year ago

proofit404 commented 3 years ago

a1s1 can't be coroutine while a1s2 is a function.

A suggested implementation:

steps = ['a1s1','a1s2','b1']
methods = {'a1s1': f, 'a1s2': async f}
kinds = {is_coroutine_function, methods.values()} # set generator
if kinds == {True, False}:
    raise exception (class has mixed methods)
proofit404 commented 1 year ago

Superseded by #723