@@ -143,7 +143,7 @@ def _copy_kwargs(self, **kwargs):
143
143
body = list (self .body ),
144
144
strict = self .strict )
145
145
146
- @_tools .deprecate_positional_args (supported_number = 1 )
146
+ @_tools .deprecate_positional_args (supported_number = 0 , ignore_arg = 'self' )
147
147
def clear (self , keep_attrs : bool = False ) -> None :
148
148
"""Reset content to an empty body, clear graph/node/egde_attr mappings.
149
149
@@ -155,7 +155,7 @@ def clear(self, keep_attrs: bool = False) -> None:
155
155
a .clear ()
156
156
self .body .clear ()
157
157
158
- @_tools .deprecate_positional_args (supported_number = 1 )
158
+ @_tools .deprecate_positional_args (supported_number = 0 , ignore_arg = 'self' )
159
159
def __iter__ (self , subgraph : bool = False ) -> typing .Iterator [str ]:
160
160
r"""Yield the DOT source code line by line (as graph or subgraph).
161
161
@@ -181,7 +181,7 @@ def __iter__(self, subgraph: bool = False) -> typing.Iterator[str]:
181
181
182
182
yield self ._tail
183
183
184
- @_tools .deprecate_positional_args (supported_number = 3 )
184
+ @_tools .deprecate_positional_args (supported_number = 2 , ignore_arg = 'self' )
185
185
def node (self , name : str ,
186
186
label : typing .Optional [str ] = None ,
187
187
_attributes = None , ** attrs ) -> None :
@@ -203,7 +203,7 @@ def node(self, name: str,
203
203
line = self ._node (name , attr_list )
204
204
self .body .append (line )
205
205
206
- @_tools .deprecate_positional_args (supported_number = 4 )
206
+ @_tools .deprecate_positional_args (supported_number = 3 , ignore_arg = 'self' )
207
207
def edge (self , tail_name : str , head_name : str ,
208
208
label : typing .Optional [str ] = None ,
209
209
_attributes = None , ** attrs ) -> None :
@@ -254,7 +254,7 @@ def edges(self, tail_head_iter) -> None:
254
254
self .body += [edge (tail = quote (t ), head = quote (h ))
255
255
for t , h in tail_head_iter ]
256
256
257
- @_tools .deprecate_positional_args (supported_number = 2 )
257
+ @_tools .deprecate_positional_args (supported_number = 1 , ignore_arg = 'self' )
258
258
def attr (self , kw : typing .Optional [str ] = None ,
259
259
_attributes = None , ** attrs ) -> None :
260
260
"""Add a general or graph/node/edge attribute statement.
@@ -278,7 +278,7 @@ def attr(self, kw: typing.Optional[str] = None,
278
278
line = self ._attr (kw , attr_list )
279
279
self .body .append (line )
280
280
281
- @_tools .deprecate_positional_args (supported_number = 2 )
281
+ @_tools .deprecate_positional_args (supported_number = 1 , ignore_arg = 'self' )
282
282
def subgraph (self , graph = None ,
283
283
name : typing .Optional [str ] = None ,
284
284
comment : typing .Optional [str ] = None ,
0 commit comments