Skip to content

Commit

Permalink
increase category for _attributes deprecation to DeprecationWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
xflr6 committed May 13, 2024
1 parent ba6fa6f commit 4366413
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions graphviz/dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def __iter__(self, subgraph: bool = False) -> typing.Iterator[str]:

yield self._tail

@_tools.deprecate_positional_args(supported_number=2, ignore_arg='self')
@_tools.deprecate_positional_args(supported_number=2, ignore_arg='self',
category=DeprecationWarning)
def node(self, name: str,
label: typing.Optional[str] = None,
_attributes=None, **attrs) -> None:
Expand All @@ -203,7 +204,8 @@ def node(self, name: str,
line = self._node(name, attr_list)
self.body.append(line)

@_tools.deprecate_positional_args(supported_number=3, ignore_arg='self')
@_tools.deprecate_positional_args(supported_number=3, ignore_arg='self',
category=DeprecationWarning)
def edge(self, tail_name: str, head_name: str,
label: typing.Optional[str] = None,
_attributes=None, **attrs) -> None:
Expand Down Expand Up @@ -254,7 +256,8 @@ def edges(self, tail_head_iter) -> None:
self.body += [edge(tail=quote(t), head=quote(h))
for t, h in tail_head_iter]

@_tools.deprecate_positional_args(supported_number=1, ignore_arg='self')
@_tools.deprecate_positional_args(supported_number=1, ignore_arg='self',
category=DeprecationWarning)
def attr(self, kw: typing.Optional[str] = None,
_attributes=None, **attrs) -> None:
"""Add a general or graph/node/edge attribute statement.
Expand Down

0 comments on commit 4366413

Please sign in to comment.