Skip to content

Commit c69ffe4

Browse files
[Python] Use new style class definitions: "class A" → "class A(object)"
1 parent 30b66ea commit c69ffe4

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

tools/SourceKit/bindings/python/sourcekitd/capi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def register(item):
555555
map(register, functionList)
556556

557557

558-
class Config:
558+
class Config(object):
559559
library_path = None
560560
library_file = None
561561
loaded = False

utils/gyb.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def code_starts_with_dedent_keyword(source_lines):
371371
return token_text in ('else', 'elif', 'except', 'finally')
372372

373373

374-
class ParseContext:
374+
class ParseContext(object):
375375
"""State carried through a parse of a template"""
376376

377377
filename = ''
@@ -539,7 +539,7 @@ def next_token(self):
539539
self.token_kind = None
540540

541541

542-
class ExecutionContext:
542+
class ExecutionContext(object):
543543
"""State we pass around during execution of a template"""
544544

545545
def __init__(self, line_directive='// ###setline', **local_bindings):

utils/profdata_merge/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import tempfile
1616

1717

18-
class Config():
18+
class Config(object):
1919
"""A class to store configuration information specified by command-line
2020
arguments.
2121
"""

utils/swift-bench.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def pstdev(l):
4747
return (sum((x - sum(l) / float(len(l))) ** 2 for x in l) / len(l)) ** 0.5
4848

4949

50-
class SwiftBenchHarness:
50+
class SwiftBenchHarness(object):
5151
sources = []
5252
verbose_level = 0
5353
compiler = ""
@@ -332,7 +332,7 @@ def report_results(self):
332332
self.tests[t].do_print()
333333

334334

335-
class Test:
335+
class Test(object):
336336

337337
def __init__(self, name, source, processed_source, binary):
338338
self.name = name
@@ -354,7 +354,7 @@ def do_print(self):
354354
print("")
355355

356356

357-
class TestResults:
357+
class TestResults(object):
358358

359359
def __init__(self, name, samples):
360360
self.name = name

utils/viewcfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Use the a unique output-suffix to open a CFG in a new window.
4545
""")
4646

4747

48-
class Block:
48+
class Block(object):
4949

5050
current_index = 0
5151

0 commit comments

Comments
 (0)