Files
openide/python/testData/formatter/wrappingInCollectionsCommentsStayOnTheSameLine_after.py
Daniil Kalinin 5b0b94a8dd [python] Formatter: Make sure that comments in collections are not placed on the new line on wrap
* Extract getting wrapping for collections and arg/param lists into a separate method
* Add a test

GitOrigin-RevId: 7ac252e5ab414329951adc61ea0dd29beeb27c04
2025-02-13 10:45:38 +00:00

58 lines
1.0 KiB
Python

num_dict = {
"one": 1, # comment
"two": 2, # comment
"three": 3, # comment
"four": 4, # comment
"five": 5 # comment
}
colors = [
'red', # comment
'green', # comment
'blue', # comment
'black', # comment
'white', # comment
'gray' # comment
]
star_names = {
"Sirius", # comment
"Betelgeuse", # comment
"Polaris", # comment
"Vega", # comment
"Arcturus", # comment
"Aldebaran" # comment
}
planets = (
"Mercury", # comment
"Venus", # comment
"Earth", # comment
"Mars", # comment
"Jupiter", # comment
"Saturn", # comment
"Uranus", # comment
"Neptune" # comment
)
def xyzzy(
a1, # comment
a2, # comment
long_parameter_1, # comment
a3, # comment
a4, # comment
long_parameter_2 # comment
):
pass
xyzzy(
1, # comment
2, # comment
'long_string_constant1', # comment
3, # comment
4, # comment
'long_string_constant2' # comment
)