Files
openide/python/testData/optimizeImports/commentsHandling.py
Mikhail Golubev 3d8d7cda5d PY-19837 Preserve trailing comments in optimize imports
When there are a few such comments after "from" imports that are
going to be combined into one, the first of the comments is inserted
on the same line after the statement, and the remaining ones appear
below as extra line comments.
2017-03-09 16:49:34 +03:00

20 lines
424 B
Python

#!/usr/bin/python
# comment for b
import b
# comment for a
import a # trailing comment for normal import
# comment for c, d
import d, c # trailing comment for c, d
# comment for name2
from mod import name2 # trailing comment for name2
# comment for name1 and name3
from mod import name1, name3 # trailing comment for name1, name3
# comment for star import
from mod2 import *
print(a, b, c, d, name1, name2, name3)