Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/graphviz/parameters/base.py: 62%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1"""Rendering parameter handling.""" 

2 

3from .. import copying 

4 

5__all__ = ['ParameterBase'] 

6 

7 

8class ParameterBase(copying.CopyBase): 

9 """Rendering parameter.""" 

10 

11 def _getattr_from_dict(self, attrname: str, *, default=None): 

12 """Return self.attrname if attrname is in the instance dictionary 

13 (as oposed to on the type).""" 

14 if attrname in self.__dict__: 

15 return getattr(self, attrname) 

16 return default