Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/graphviz/copying.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
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
1"""Create new instance copies with cooperative ``super()`` calls."""
3__all__ = ['CopyBase']
6class CopyBase:
7 """Create new instance copies with cooperative ``super()`` calls."""
9 def copy(self):
10 """Return a copied instance of the object.
12 Returns:
13 An independent copy of the current object.
14 """
15 kwargs = self._copy_kwargs()
16 return self.__class__(**kwargs)
18 def _copy_kwargs(self, **kwargs):
19 """Return the kwargs to create a copy of the instance."""
20 return kwargs