Skip to content

Commit ef09031

Browse files
committed
Swift: fix autopep8 and codegen
1 parent 47f26e6 commit ef09031

File tree

6 files changed

+750
-749
lines changed

6 files changed

+750
-749
lines changed

swift/codegen/generators/qlgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _is_under_qltest_collapsed_hierachy(cls: schema.Class, lookup: typing.Dict[s
201201

202202
def _should_skip_qltest(cls: schema.Class, lookup: typing.Dict[str, schema.Class]):
203203
return "qltest_skip" in cls.pragmas or not (
204-
cls.final or "qltest_collapse_hierarchy" in cls.pragmas) or _is_under_qltest_collapsed_hierachy(
204+
cls.final or "qltest_collapse_hierarchy" in cls.pragmas) or _is_under_qltest_collapsed_hierachy(
205205
cls, lookup)
206206

207207

swift/codegen/test/test_ql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def test_property_is_repeated(plural, expected):
5858
(False, True, None, False),
5959
])
6060
def test_property_is_single(is_optional, is_predicate, plural, expected):
61-
prop = ql.Property("foo", "Foo", "props", ["result"], plural=plural, is_predicate=is_predicate, is_optional=is_optional)
61+
prop = ql.Property("foo", "Foo", "props", ["result"], plural=plural,
62+
is_predicate=is_predicate, is_optional=is_optional)
6263
assert prop.is_single is expected
6364

6465

swift/codegen/test/test_qlgen.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ def test_single_property(generate_classes):
199199
"MyObject.qll": (ql.Stub(name="MyObject", base_import=gen_import_prefix + "MyObject"),
200200
ql.Class(name="MyObject", final=True,
201201
properties=[
202-
ql.Property(singular="Foo", type="bar", tablename="my_objects",
203-
tableparams=["this", "result"]),
204-
])),
202+
ql.Property(singular="Foo", type="bar", tablename="my_objects",
203+
tableparams=["this", "result"]),
204+
])),
205205
}
206206

207207

@@ -216,13 +216,13 @@ def test_single_properties(generate_classes):
216216
"MyObject.qll": (ql.Stub(name="MyObject", base_import=gen_import_prefix + "MyObject"),
217217
ql.Class(name="MyObject", final=True,
218218
properties=[
219-
ql.Property(singular="One", type="x", tablename="my_objects",
220-
tableparams=["this", "result", "_", "_"]),
221-
ql.Property(singular="Two", type="y", tablename="my_objects",
222-
tableparams=["this", "_", "result", "_"]),
223-
ql.Property(singular="Three", type="z", tablename="my_objects",
224-
tableparams=["this", "_", "_", "result"]),
225-
])),
219+
ql.Property(singular="One", type="x", tablename="my_objects",
220+
tableparams=["this", "result", "_", "_"]),
221+
ql.Property(singular="Two", type="y", tablename="my_objects",
222+
tableparams=["this", "_", "result", "_"]),
223+
ql.Property(singular="Three", type="z", tablename="my_objects",
224+
tableparams=["this", "_", "_", "result"]),
225+
])),
226226
}
227227

228228

0 commit comments

Comments
 (0)