diff options
-rw-r--r-- | CONTRIBUTORS.txt | 3 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pylint/graph.py | 13 |
3 files changed, 7 insertions, 13 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index eb96651a5..0b82832b7 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -366,4 +366,7 @@ contributors: * Anubhav: contributor +* Ben Graham: contributor + * Anthony Tan: contributor + @@ -7,9 +7,7 @@ What's New in Pylint 2.5.0? Release date: TBA -* Remove unused import - - Close #3379 +* Fixed graph creation for relative paths * Add a check for asserts on string literals. diff --git a/pylint/graph.py b/pylint/graph.py index 0dc7a1460..9e0348144 100644 --- a/pylint/graph.py +++ b/pylint/graph.py @@ -71,30 +71,23 @@ class DotBackend: source = property(get_source) - def generate(self, outputfile=None, dotfile=None, mapfile=None): + def generate(self, outputfile=None, mapfile=None): """Generates a graph file. :param str outputfile: filename and path [defaults to graphname.png] - :param str dotfile: filename and path [defaults to graphname.dot] :param str mapfile: filename and path :rtype: str :return: a path to the generated file """ name = self.graphname - if not dotfile: - # if 'outputfile' is a dot file use it as 'dotfile' - if outputfile and outputfile.endswith(".dot"): - dotfile = outputfile - else: - dotfile = "%s.dot" % name if outputfile is not None: - storedir, _, target = target_info_from_filename(outputfile) + _, _, target = target_info_from_filename(outputfile) if target != "dot": pdot, dot_sourcepath = tempfile.mkstemp(".dot", name) os.close(pdot) else: - dot_sourcepath = osp.join(storedir, dotfile) + dot_sourcepath = outputfile else: target = "png" pdot, dot_sourcepath = tempfile.mkstemp(".dot", name) |