aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/python/comprehensions.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/indent/python/comprehensions.py')
-rw-r--r--tests/indent/python/comprehensions.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/indent/python/comprehensions.py b/tests/indent/python/comprehensions.py
new file mode 100644
index 000000000..53c3961e1
--- /dev/null
+++ b/tests/indent/python/comprehensions.py
@@ -0,0 +1,25 @@
+# list
+a = [
+ x + 1 for x in range(3)
+]
+
+# dict
+b = {
+ x: x + 1 for x in range(3)
+}
+
+# generator
+c = (
+ x * x for x in range(3)
+)
+
+# set
+d = {
+ x + x for x in range(3)
+}
+
+# other styles
+e = [
+ x + 1 for x
+ in range(3)
+]