Closed MartinThoma closed 3 years ago
$ astpretty --no-show-offsets /dev/stdin <<< `cat example.txt`
Module(
body=[
Expr(
value=Compare(
left=Name(id='key', ctx=Load()),
ops=[In()],
comparators=[
Call(
func=Attribute(
value=Name(id='some_dict', ctx=Load()),
attr='keys',
ctx=Load(),
),
args=[],
keywords=[],
),
],
),
),
],
type_ignores=[],
)
Duplicate of SIM118
Explanation
The first one is shorter and extremely wide-spread
Example