Table("q", meta, Column("id", Integer), PrimaryKeyConstraint("id"))
# intentional new line
- Table("r", meta,
- Column("id", Integer),
- Column("value", Integer),
- Column("prefix", String),
- PrimaryKeyConstraint("id"),
- CheckConstraint("id > 0"),
- # Constraint definition with newline and tab characters
- CheckConstraint(
- """((value > 0) AND \n\t(value < 100) AND \n\t
+ Table(
+ "r",
+ meta,
+ Column("id", Integer),
+ Column("value", Integer),
+ Column("prefix", String),
+ PrimaryKeyConstraint("id"),
+ CheckConstraint("id > 0"),
+ # Constraint definition with newline and tab characters
+ CheckConstraint(
+ """((value > 0) AND \n\t(value < 100) AND \n\t
(value != 50))""",
- name='ck_r_value_multiline'),
- # Constraint name with special chars and 'check' in the name
- CheckConstraint("value IS NOT NULL", name="^check-r* #\n\t"),
- # Constraint definition with special characters.
- CheckConstraint("prefix NOT GLOB '*[^-. /#,]*'")
- )
+ name="ck_r_value_multiline",
+ ),
+ # Constraint name with special chars and 'check' in the name
+ CheckConstraint("value IS NOT NULL", name="^check-r* #\n\t"),
+ # Constraint definition with special characters.
+ CheckConstraint("prefix NOT GLOB '*[^-. /#,]*'"),
+ )
meta.create_all(conn)
{"sqltext": "value IS NOT NULL", "name": "^check-r* #\n\t"},
# Triple-quote multi-line definition should have added a
# newline and whitespace:
- {"sqltext": "((value > 0) AND \n\t(value < 100) AND \n\t\n"
- " (value != 50))",
- "name": "ck_r_value_multiline"},
+ {
+ "sqltext": "((value > 0) AND \n\t(value < 100) AND \n\t\n"
+ " (value != 50))",
+ "name": "ck_r_value_multiline",
+ },
{"sqltext": "id > 0", "name": None},
{"sqltext": "prefix NOT GLOB '*[^-. /#,]*'", "name": None},
],