Skip to content

Commit

Permalink
Changed arguments list of GraphMLWriterLxml.dump() (#6261)
Browse files Browse the repository at this point in the history
Changed arguments list of GraphMLWriterLxml.dump to be consistent with the type of GraphMLWriter.dump.
(Otherwise, if we have some GraphMLWriterLxml A, and some user calls A.dump(stream) (maybe in the context of a function which takes a GraphMLWriter) then it will call the method of the parent class rather than that of the child class.)
This also makes static analysis tools happier, which reduces the amount of things to look at when debugging.
  • Loading branch information
patrick-nicodemus committed Nov 11, 2023
1 parent e3d5146 commit 6b0385d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion networkx/readwrite/graphml.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def add_attributes(self, scope, xml_obj, data, default):
def __str__(self):
return object.__str__(self)

def dump(self):
def dump(self, stream=None):
self._graphml.__exit__(None, None, None)
self._xml_base.__exit__(None, None, None)

Expand Down

0 comments on commit 6b0385d

Please sign in to comment.