Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/graphviz/copying.py: 57%
7 statements
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-26 06:43 +0000
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-26 06:43 +0000
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