diff options
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/graph.py | 13 |
1 files changed, 3 insertions, 10 deletions
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) |