Skip to content

Commit 73b63c8

Browse files
Conform to standard spacing around operators, etc.
1 parent 57d4f2d commit 73b63c8

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

stdlib/public/SDK/Foundation/FoundationMirrors.swift.gyb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
// probably not worth trying to write one unique generator - let's
2020
// just use these helpers manually and write the bulk of each one
2121
%{
22-
def getMirrorConformance(Self,Disp = None):
22+
def getMirrorConformance(Self, Disp=None):
2323
return gyb.executeTemplate(
24-
TMirrorConformance,introspecteeType=Self,disposition=Disp)
24+
TMirrorConformance, introspecteeType=Self, disposition=Disp)
2525

26-
def getMirrorBoilerplate(Self,Disp = None):
26+
def getMirrorBoilerplate(Self, Disp=None):
2727
return gyb.executeTemplate(
28-
TMirrorBoilerplate,introspecteeType=Self,disposition=Disp)
28+
TMirrorBoilerplate, introspecteeType=Self, disposition=Disp)
2929

30-
def getMirrorDecl(Self,Disp = None):
31-
return gyb.executeTemplate(TMirrorDecl,introspecteeType=Self,disposition=Disp)
30+
def getMirrorDecl(Self, Disp=None):
31+
return gyb.executeTemplate(TMirrorDecl, introspecteeType=Self, disposition=Disp)
3232
}%
3333

3434
// actual Mirrors

stdlib/public/SDK/simd/simd.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Darwin
3030
// Workaround <rdar://problem/18900352>
3131
% vectype = ctype[type] + str(size)
3232
% llvm_vectype = "Vec" + str(size) + "x" + llvm_type[type]
33-
% vecsize = (8 if type == 'Double' else 4)*(2 if size == 2 else 4)
33+
% vecsize = (8 if type == 'Double' else 4) * (2 if size == 2 else 4)
3434
% extractelement = "extractelement_" + llvm_vectype + "_Int32"
3535
% insertelement = "insertelement_" + llvm_vectype + "_" + llvm_type[type] + "_Int32"
3636
% is_floating = type in floating_types

stdlib/public/core/Slice.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_slice_doc_comment(Self):
3636
/// the slice may prolong the lifetime of elements that are no longer
3737
/// accessible, which can manifest as apparent memory and object leakage. To
3838
/// prevent this effect, use slices only for transient computation.\
39-
""" % (Self, Self, Self, Self, Self)
39+
""" % (Self, Self, Self, Self, Self)
4040
}%
4141

4242
${get_slice_doc_comment('Slice')}

stdlib/public/core/Sort.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
%{
14-
def cmp(a,b,p):
14+
def cmp(a, b, p):
1515
if p:
16-
return "isOrderedBefore("+a+", "+b+")"
16+
return "isOrderedBefore(" + a + ", " + b + ")"
1717
else:
18-
return "("+a+" < "+b+")"
18+
return "(" + a + " < " + b + ")"
1919

2020
}%
2121

stdlib/public/core/Tuple.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Generate comparison functions for tuples up to some reasonable arity.
1414

1515
% for arity in range(2,7):
16-
% typeParams = [chr(ord("A")+i) for i in range(arity)]
16+
% typeParams = [chr(ord("A") + i) for i in range(arity)]
1717
% tupleT = "({})".format(",".join(typeParams))
1818

1919
% equatableTypeParams = ", ".join(["{} : Equatable".format(c) for c in typeParams])

test/1_stdlib/Tuple.swift.gyb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ TupleTestSuite.test("Tuple/equality") {
6868

6969
TupleTestSuite.test("Tuple/equality/sanity-check") {
7070
// sanity check all arities
71-
% for arity in range(2,maxArity+1):
71+
% for arity in range(2, maxArity+1):
7272
% a = str(tuple(range(1, arity+1)))
73-
% b = "({}, 0)".format(", ".join([str(i) for i in range(1,arity)]))
74-
% c = "(0, {})".format(", ".join([str(i) for i in range(2,arity+1)]))
73+
% b = "({}, 0)".format(", ".join([str(i) for i in range(1, arity)]))
74+
% c = "(0, {})".format(", ".join([str(i) for i in range(2, arity+1)]))
7575
expectTrue(${a} == ${a})
7676
expectTrue(${a} != ${b})
7777
expectTrue(${b} != ${a})
@@ -147,10 +147,10 @@ TupleTestSuite.test("Tuple/comparison") {
147147

148148
TupleTestSuite.test("Tuple/comparison/sanity-check") {
149149
// sanity check all arities
150-
% for arity in range(2,maxArity+1):
150+
% for arity in range(2, maxArity+1):
151151
% a = str(tuple(range(1, arity+1)))
152-
% b = "({}, 0)".format(", ".join([str(i) for i in range(1,arity)]))
153-
% c = "(0, {})".format(", ".join([str(i) for i in range(2,arity+1)]))
152+
% b = "({}, 0)".format(", ".join([str(i) for i in range(1, arity)]))
153+
% c = "(0, {})".format(", ".join([str(i) for i in range(2, arity+1)]))
154154
expectTrue(${b} < ${a})
155155
expectTrue(${b} <= ${a})
156156
expectTrue(${a} > ${c})

0 commit comments

Comments
 (0)