Hide certain implementation specific classes/variables#1684
Hide certain implementation specific classes/variables#1684lzchen merged 7 commits intoopen-telemetry:mainfrom
Conversation
|
|
||
| @abstractmethod | ||
| def attach(self, context: Context) -> object: | ||
| """Sets the current `Context` object. Returns a |
There was a problem hiding this comment.
Why remove the documentation? It is very possible that this documentation applies for all implementations of this abstract method.
Also this:
from abc import ABC, abstractmethod
from inspect import getdoc
class Parent(ABC):
@abstractmethod
def method(self):
"""
The documentation for method
"""
class Child(Parent):
def method(self):
pass
print(getdoc(Child().method))The documentation for method
There was a problem hiding this comment.
Since _RuntimeContext is used internally, we do not expect anyone to inherit it and implement a context on their own. As well, since we are hiding the class via protected, the documentation will not show up in readthedocs anyways.
There was a problem hiding this comment.
Still nice to have for us so if you mouse a call site, IDEs will show the docstring
There was a problem hiding this comment.
Sure, I added to both.
There was a problem hiding this comment.
I still think it would be convenient to keep the documentation since there will be classes that will inherit from this one, but this is pretty much a nit, so approving.
Fixes #1640