You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course, with some amount of error handling if a team with the given name doesn't exist. The easiest (somewhat dirty) way would probably be to add that method, with implementation, directly in the _APISpec class. That makes _APISpec impure in terms of just being a specification, thoguh, and I don't really like the idea of inheriting functionality in that way.
Perhaps there's a better way using a mixin class or some more magic in the metaclass.
I'm thinking we could probably add this as a base function for all APIs
Do you mean adding this implementation in all the APIs which extend from PlatformAPI? That would be a lot of repetitive code, I think.
Should we, instead, implement the method in PlatformAPI so that all the APIs can extend this method as the implementation shall remain the same regardless of the platform? This would also help in throwing an exception if the team does not exist. Also, we wouldn't be making the _APISpec class non-abstract too.
Do you mean adding this implementation in all the APIs which extend from PlatformAPI?
No, I meant for them to inherit it somehow. But I'm not a huge fan of inheritance in that fashion, rather prefer explicit mixin classes.
Should we, instead, implement the method in PlatformAPI
We could, but I like how PlatformAPI doesn't carry any real behavior at the moment. It just wraps the metaclass. But perhaps this is the most pragmatic approach.
Same rationale as #672
The text was updated successfully, but these errors were encountered: