提交 fd750a25 authored 作者: Michael Osthege's avatar Michael Osthege 提交者: Brandon T. Willard

Add missing returns in rare code paths

上级 6a4d48bd
...@@ -329,6 +329,7 @@ N.B.: ...@@ -329,6 +329,7 @@ N.B.:
return _file.getvalue() return _file.getvalue()
else: else:
_file.flush() _file.flush()
return _file
def _debugprint( def _debugprint(
...@@ -396,7 +397,7 @@ def _debugprint( ...@@ -396,7 +397,7 @@ def _debugprint(
Internal. Used to pass information when recursing. Internal. Used to pass information when recursing.
""" """
if depth == 0: if depth == 0:
return return file
if order is None: if order is None:
order = [] order = []
...@@ -903,6 +904,7 @@ class PPrinter(Printer): ...@@ -903,6 +904,7 @@ class PPrinter(Printer):
for condition, printer in self.printers: for condition, printer in self.printers:
if condition(pstate, r): if condition(pstate, r):
return printer.process(r, pstate) return printer.process(r, pstate)
return ""
def clone(self): def clone(self):
cp = copy(self) cp = copy(self)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论