(self, name: str)
| 39 | self.__callback = callback |
| 40 | |
| 41 | def __getattr__(self, name: str) -> Any: |
| 42 | # The vagaries of garbage collection means that self.__fp is |
| 43 | # not always set. By using __getattribute__ and the private |
| 44 | # name[0] allows looking up the attribute value and raising an |
| 45 | # AttributeError when it doesn't exist. This stop things from |
| 46 | # infinitely recursing calls to getattr in the case where |
| 47 | # self.__fp hasn't been set. |
| 48 | # |
| 49 | # [0] https://docs.python.org/2/reference/expressions.html#atom-identifiers |
| 50 | fp = self.__getattribute__("_CallbackFileWrapper__fp") |
| 51 | return getattr(fp, name) |
| 52 | |
| 53 | def __is_fp_closed(self) -> bool: |
| 54 | try: |
nothing calls this directly
no outgoing calls
no test coverage detected