You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Better docstring recognition
This commit is contained in:
4
test/simple_source/bug26/00_future_divide.py
Normal file
4
test/simple_source/bug26/00_future_divide.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# From 2.7.17 fractions
|
||||||
|
"""Rational, infinite-precision, real numbers."""
|
||||||
|
|
||||||
|
from __future__ import division
|
@@ -407,8 +407,13 @@ class TreeTransform(GenericASTTraversal, object):
|
|||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for i in range(len(self.ast)):
|
for i in range(len(self.ast)):
|
||||||
|
sstmt = ast[i]
|
||||||
|
if len(sstmt) == 1 and sstmt == "sstmt":
|
||||||
|
ast[i] = ast[i][0]
|
||||||
|
|
||||||
if is_docstring(self.ast[i]):
|
if is_docstring(self.ast[i]):
|
||||||
docstring_ast = SyntaxTree(
|
docstring_ast = SyntaxTree(
|
||||||
"docstring",
|
"docstring",
|
||||||
|
Reference in New Issue
Block a user